41 |
// Client socket stuff. |
// Client socket stuff. |
42 |
lscp_client_proc_t pfnCallback; |
lscp_client_proc_t pfnCallback; |
43 |
void * pvData; |
void * pvData; |
44 |
lscp_socket_agent_t tcp; |
lscp_socket_agent_t cmd; |
45 |
lscp_socket_agent_t udp; |
lscp_socket_agent_t evt; |
46 |
// Session identifier. |
// Subscribed events. |
47 |
char * sessid; |
lscp_event_t events; |
48 |
// Client struct persistent caches. |
// Client struct persistent caches. |
49 |
char ** audio_drivers; |
char ** audio_drivers; |
50 |
char ** midi_drivers; |
char ** midi_drivers; |
51 |
|
int * audio_devices; |
52 |
|
int * midi_devices; |
53 |
char ** engines; |
char ** engines; |
54 |
|
int * channels; |
55 |
// Client struct volatile caches. |
// Client struct volatile caches. |
56 |
lscp_driver_info_t audio_info; |
lscp_driver_info_t audio_info; |
57 |
lscp_driver_info_t midi_info; |
lscp_driver_info_t midi_info; |
70 |
|
|
71 |
|
|
72 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
73 |
|
// Local client request executive. |
74 |
|
|
75 |
|
lscp_status_t lscp_client_call (lscp_client_t *pClient, const char *pszQuery); |
76 |
|
void lscp_client_set_result (lscp_client_t *pClient, char *pszResult, int iErrno); |
77 |
|
|
78 |
|
//------------------------------------------------------------------------- |
79 |
// General utility function prototypes. |
// General utility function prototypes. |
80 |
|
|
81 |
char * lscp_strtok (char *pchBuffer, const char *pszSeps, char **ppch); |
char * lscp_strtok (char *pchBuffer, const char *pszSeps, char **ppch); |
82 |
char * lscp_ltrim (char *psz); |
char * lscp_ltrim (char *psz); |
83 |
char * lscp_unquote (char **ppsz, int dup); |
char * lscp_unquote (char **ppsz, int dup); |
84 |
|
|
85 |
char ** lscp_szsplit_create (const char *pszCsv, const char *pszSeps); |
char ** lscp_szsplit_create (const char *pszCsv, const char *pszSeps); |
86 |
void lscp_szsplit_destroy (char **ppszSplit); |
void lscp_szsplit_destroy (char **ppszSplit); |
87 |
#ifdef LSCP_SZSPLIT_COUNT |
#ifdef LSCP_SZSPLIT_COUNT |
88 |
int lscp_szsplit_count (char **ppszSplit); |
int lscp_szsplit_count (char **ppszSplit); |
89 |
int lscp_szsplit_size (char **ppszSplit); |
int lscp_szsplit_size (char **ppszSplit); |
90 |
#endif |
#endif |
91 |
|
|
92 |
|
int * lscp_isplit_create (const char *pszCsv, const char *pszSeps); |
93 |
|
void lscp_isplit_destroy (int *piSplit); |
94 |
|
#ifdef LSCP_ISPLIT_COUNT |
95 |
|
int lscp_isplit_count (int *piSplit); |
96 |
|
int lscp_isplit_size (int *piSplit); |
97 |
|
#endif |
98 |
|
|
99 |
|
lscp_param_t * lscp_psplit_create (const char *pszCsv, const char *pszSep1, const char *pszSep2); |
100 |
|
void lscp_psplit_destroy (lscp_param_t *ppSplit); |
101 |
|
#ifdef LSCP_PSPLIT_COUNT |
102 |
|
int lscp_psplit_count (lscp_param_t *ppSplit); |
103 |
|
int lscp_psplit_size (lscp_param_t *ppSplit); |
104 |
|
#endif |
105 |
|
|
106 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
107 |
// Engine struct helper functions. |
// Engine struct helper functions. |
108 |
|
|
109 |
void lscp_engine_info_init (lscp_engine_info_t *pEngineInfo); |
void lscp_engine_info_init (lscp_engine_info_t *pEngineInfo); |
110 |
void lscp_engine_info_reset (lscp_engine_info_t *pEngineInfo); |
void lscp_engine_info_reset (lscp_engine_info_t *pEngineInfo); |
111 |
|
|
112 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
113 |
// Channel struct helper functions. |
// Channel struct helper functions. |
114 |
|
|
115 |
void lscp_channel_info_init (lscp_channel_info_t *pChannelInfo); |
void lscp_channel_info_init (lscp_channel_info_t *pChannelInfo); |
116 |
void lscp_channel_info_reset (lscp_channel_info_t *pChannelInfo); |
void lscp_channel_info_reset (lscp_channel_info_t *pChannelInfo); |
117 |
|
|
118 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
119 |
// Driver struct helper functions. |
// Driver struct helper functions. |
120 |
|
|
121 |
void lscp_driver_info_init (lscp_driver_info_t *pDriverInfo); |
void lscp_driver_info_init (lscp_driver_info_t *pDriverInfo); |
122 |
void lscp_driver_info_reset (lscp_driver_info_t *pDriverInfo); |
void lscp_driver_info_reset (lscp_driver_info_t *pDriverInfo); |
123 |
|
|
124 |
|
|
125 |
#endif // __LSCP_COMMON_H |
#endif // __LSCP_COMMON_H |