client.h | client.h | |||
---|---|---|---|---|
// client.h | // client.h | |||
// | // | |||
/************************************************************************** ** | /************************************************************************** ** | |||
liblscp - LinuxSampler Control Protocol API | ||||
Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. | Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. | |||
This program is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU General Public License | modify it under the terms of the GNU Lesser General Public | |||
as published by the Free Software Foundation; either version 2 | License as published by the Free Software Foundation; either | |||
of the License, or (at your option) any later version. | version 2.1 of the License, or (at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
GNU General Public License for more details. | Lesser General Public License for more details. | |||
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU Lesser General Public | |||
along with this program; if not, write to the Free Software | License along with this library; if not, write to the Free Software | |||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
A. | ||||
*************************************************************************** **/ | *************************************************************************** **/ | |||
#ifndef __LSCP_CLIENT_H | #ifndef __LSCP_CLIENT_H | |||
#define __LSCP_CLIENT_H | #define __LSCP_CLIENT_H | |||
#include "lscp/socket.h" | #include "lscp/socket.h" | |||
#if defined(__cplusplus) | #if defined(__cplusplus) | |||
extern "C" { | extern "C" { | |||
skipping to change at line 131 | skipping to change at line 132 | |||
// Result and error status. | // Result and error status. | |||
char * pszResult; | char * pszResult; | |||
int iErrno; | int iErrno; | |||
// Stream buffers status. | // Stream buffers status. | |||
lscp_buffer_fill_t *buffer_fill; | lscp_buffer_fill_t *buffer_fill; | |||
int iStreamCount; | int iStreamCount; | |||
} lscp_client_t; | } lscp_client_t; | |||
//------------------------------------------------------------------------- | //------------------------------------------------------------------------- | |||
// Client versioning teller fuunction. | ||||
const char * lscp_client_package (void); | ||||
const char * lscp_client_version (void); | ||||
const char * lscp_client_build (void); | ||||
//------------------------------------------------------------------------- | ||||
// Client socket functions. | // Client socket functions. | |||
lscp_client_t * lscp_client_create (char *pszHost, int iPort, lscp_client_proc_t pfnCallback, void *pvData); | lscp_client_t * lscp_client_create (char *pszHost, int iPort, lscp_client_proc_t pfnCallback, void *pvData); | |||
lscp_status_t lscp_client_join (lscp_client_t *pCl ient); | lscp_status_t lscp_client_join (lscp_client_t *pCl ient); | |||
lscp_status_t lscp_client_destroy (lscp_client_t *pCl ient); | lscp_status_t lscp_client_destroy (lscp_client_t *pCl ient); | |||
lscp_status_t lscp_client_call (lscp_client_t *pCl ient, const char *pchBuffer, int cchBuffer, char *pchResult, int *pcchResul t); | lscp_status_t lscp_client_call (lscp_client_t *pCl ient, const char *pchBuffer, int cchBuffer, char *pchResult, int *pcchResul t); | |||
lscp_status_t lscp_client_subscribe (lscp_client_t *pCl ient); | lscp_status_t lscp_client_subscribe (lscp_client_t *pCl ient); | |||
lscp_status_t lscp_client_unsubscribe (lscp_client_t *pCl ient); | lscp_status_t lscp_client_unsubscribe (lscp_client_t *pCl ient); | |||
End of changes. 6 change blocks. | ||||
11 lines changed or deleted | 18 lines changed or added | |||
socket.h | socket.h | |||
---|---|---|---|---|
// socket.h | // socket.h | |||
// | // | |||
/************************************************************************** ** | /************************************************************************** ** | |||
liblscp - LinuxSampler Control Protocol API | ||||
Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. | Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. | |||
This program is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU General Public License | modify it under the terms of the GNU Lesser General Public | |||
as published by the Free Software Foundation; either version 2 | License as published by the Free Software Foundation; either | |||
of the License, or (at your option) any later version. | version 2.1 of the License, or (at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
GNU General Public License for more details. | Lesser General Public License for more details. | |||
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU Lesser General Public | |||
along with this program; if not, write to the Free Software | License along with this library; if not, write to the Free Software | |||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
A. | ||||
*************************************************************************** **/ | *************************************************************************** **/ | |||
#ifndef __LSCP_SOCKET_H | #ifndef __LSCP_SOCKET_H | |||
#define __LSCP_SOCKET_H | #define __LSCP_SOCKET_H | |||
#if defined(__WIN32__) | #include "lscp/thread.h" | |||
#define WIN32 | ||||
#endif | ||||
#if defined(WIN32) | #if defined(WIN32) | |||
#include <winsock.h> | #include <winsock.h> | |||
#else | #else | |||
#include <unistd.h> | #include <unistd.h> | |||
#include <sys/socket.h> | #include <sys/socket.h> | |||
#include <netinet/in.h> | #include <netinet/in.h> | |||
#include <netinet/tcp.h> | #include <netinet/tcp.h> | |||
#include <arpa/inet.h> | #include <arpa/inet.h> | |||
#include <netdb.h> | #include <netdb.h> | |||
#endif | #endif | |||
#include "lscp/thread.h" | ||||
#if defined(__cplusplus) | #if defined(__cplusplus) | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
//------------------------------------------------------------------------- | //------------------------------------------------------------------------- | |||
// Sockets. | // Sockets. | |||
#if defined(WIN32) | #if defined(WIN32) | |||
typedef SOCKET lscp_socket_t; | typedef SOCKET lscp_socket_t; | |||
#else | #else | |||
End of changes. 7 change blocks. | ||||
16 lines changed or deleted | 12 lines changed or added | |||
thread.h | thread.h | |||
---|---|---|---|---|
// thread.h | // thread.h | |||
// | // | |||
/************************************************************************** ** | /************************************************************************** ** | |||
liblscp - LinuxSampler Control Protocol API | ||||
Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. | Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. | |||
This program is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU General Public License | modify it under the terms of the GNU Lesser General Public | |||
as published by the Free Software Foundation; either version 2 | License as published by the Free Software Foundation; either | |||
of the License, or (at your option) any later version. | version 2.1 of the License, or (at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
GNU General Public License for more details. | Lesser General Public License for more details. | |||
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU Lesser General Public | |||
along with this program; if not, write to the Free Software | License along with this library; if not, write to the Free Software | |||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
A. | ||||
*************************************************************************** **/ | *************************************************************************** **/ | |||
#ifndef __LSCP_THREAD_H | #ifndef __LSCP_THREAD_H | |||
#define __LSCP_THREAD_H | #define __LSCP_THREAD_H | |||
#include <stdio.h> | #include <stdio.h> | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include <string.h> | #include <string.h> | |||
#if defined(__WIN32__) | #if (defined(_WIN32) || defined(__WIN32__)) | |||
#define WIN32 | #define WIN32 | |||
#endif | #endif | |||
#if defined(WIN32) | #if defined(WIN32) | |||
#include <windows.h> | #include <windows.h> | |||
#else | #else | |||
#include <pthread.h> | #include <pthread.h> | |||
#endif | #endif | |||
#include "lscp/version.h" | ||||
#if defined(__cplusplus) | #if defined(__cplusplus) | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
//------------------------------------------------------------------------- | //------------------------------------------------------------------------- | |||
// Status. | // Status. | |||
typedef enum _lscp_status_t | typedef enum _lscp_status_t | |||
{ | { | |||
LSCP_OK = 0, | LSCP_OK = 0, | |||
End of changes. 7 change blocks. | ||||
12 lines changed or deleted | 14 lines changed or added | |||