mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	WIP change object model
This commit is contained in:
		
							parent
							
								
									190f01d88e
								
							
						
					
					
						commit
						c25ccbb4ba
					
				
					 44 changed files with 1557 additions and 2525 deletions
				
			
		| 
						 | 
				
			
			@ -21,49 +21,30 @@
 | 
			
		|||
#ifndef __PINOS_COMMAND_H__
 | 
			
		||||
#define __PINOS_COMMAND_H__
 | 
			
		||||
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
 | 
			
		||||
G_BEGIN_DECLS
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <pinos/server/daemon.h>
 | 
			
		||||
 | 
			
		||||
typedef struct _PinosCommand PinosCommand;
 | 
			
		||||
 | 
			
		||||
GQuark pinos_command_error_quark (void);
 | 
			
		||||
/**
 | 
			
		||||
 * PINOS_COMMAND_ERROR:
 | 
			
		||||
 *
 | 
			
		||||
 * Pinos command error.
 | 
			
		||||
 */
 | 
			
		||||
#define PINOS_COMMAND_ERROR (pinos_command_error_quark ())
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * PinosCommandError:
 | 
			
		||||
 * @PINOS_COMMAND_ERROR_GENERIC: Generic command error.
 | 
			
		||||
 * @PINOS_COMMAND_ERROR_NO_SUCH_COMMAND: No such command.
 | 
			
		||||
 * @PINOS_COMMAND_ERROR_PARSE: Failed to parse command.
 | 
			
		||||
 * @PINOS_COMMAND_ERROR_FAILED: Command failed to execute.
 | 
			
		||||
 *
 | 
			
		||||
 * Error codes for Pinos command.
 | 
			
		||||
 */
 | 
			
		||||
typedef enum
 | 
			
		||||
{
 | 
			
		||||
  PINOS_COMMAND_ERROR_GENERIC,
 | 
			
		||||
  PINOS_COMMAND_ERROR_NO_SUCH_COMMAND,
 | 
			
		||||
  PINOS_COMMAND_ERROR_PARSE,
 | 
			
		||||
  PINOS_COMMAND_ERROR_FAILED,
 | 
			
		||||
} PinosCommandError;
 | 
			
		||||
struct _PinosCommand {
 | 
			
		||||
  SpaList link;
 | 
			
		||||
 | 
			
		||||
  const char *name;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
void               pinos_command_free                 (PinosCommand *command);
 | 
			
		||||
 | 
			
		||||
gboolean           pinos_command_parse                (PinosCommand **command,
 | 
			
		||||
                                                       gchar         *line,
 | 
			
		||||
                                                       GError       **err);
 | 
			
		||||
gboolean           pinos_command_run                  (PinosCommand  *command,
 | 
			
		||||
PinosCommand *     pinos_command_parse                (const char    *line,
 | 
			
		||||
                                                       char         **err);
 | 
			
		||||
bool               pinos_command_run                  (PinosCommand  *command,
 | 
			
		||||
                                                       PinosCore     *core,
 | 
			
		||||
                                                       GError       **err);
 | 
			
		||||
const gchar *      pinos_command_get_name             (PinosCommand  *command);
 | 
			
		||||
 | 
			
		||||
G_END_DECLS
 | 
			
		||||
                                                       char         **err);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* __PINOS_COMMAND_H__ */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue