00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __JackSocketClientChannel__
00021 #define __JackSocketClientChannel__
00022
00023 #include "JackChannel.h"
00024 #include "JackSocket.h"
00025 #include "JackPlatformPlug.h"
00026 #include "JackRequest.h"
00027 #include "JackError.h"
00028
00029 namespace Jack
00030 {
00031
00036 class JackSocketClientChannel : public detail::JackClientChannelInterface, public JackRunnableInterface
00037 {
00038
00039 private:
00040
00041 JackClientSocket fRequestSocket;
00042 JackServerSocket fNotificationListenSocket;
00043 JackClientSocket* fNotificationSocket;
00044 JackThread fThread;
00045 JackClient* fClient;
00046
00047 void ServerSyncCall(JackRequest* req, JackResult* res, int* result);
00048 void ServerAsyncCall(JackRequest* req, JackResult* res, int* result);
00049
00050 public:
00051
00052 JackSocketClientChannel();
00053 virtual ~JackSocketClientChannel();
00054
00055 int Open(const char* server_name, const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status);
00056 void Close();
00057
00058 int Start();
00059 void Stop();
00060
00061 int ServerCheck(const char* server_name);
00062
00063 void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result);
00064 void ClientOpen(const char* name, int pid, int* shared_engine, int* shared_client, int* shared_graph, int* result);
00065 void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
00066 {}
00067 void ClientClose(int refnum, int* result);
00068
00069 void ClientActivate(int refnum, int state, int* result);
00070 void ClientDeactivate(int refnum, int* result);
00071
00072 void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
00073 void PortUnRegister(int refnum, jack_port_id_t port_index, int* result);
00074
00075 void PortConnect(int refnum, const char* src, const char* dst, int* result);
00076 void PortDisconnect(int refnum, const char* src, const char* dst, int* result);
00077
00078 void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
00079 void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
00080
00081 void PortRename(int refnum, jack_port_id_t port, const char* name, int* result);
00082
00083 void SetBufferSize(jack_nframes_t buffer_size, int* result);
00084 void SetFreewheel(int onoff, int* result);
00085
00086 void ReleaseTimebase(int refnum, int* result);
00087 void SetTimebaseCallback(int refnum, int conditional, int* result);
00088
00089 void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result);
00090 void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result);
00091 void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int* result);
00092 void InternalClientUnload(int refnum, int int_ref, int* status, int* result);
00093
00094
00095 bool Init();
00096 bool Execute();
00097 };
00098
00099 }
00100
00101 #endif
00102