00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __JackInternalClientChannel__
00021 #define __JackInternalClientChannel__
00022
00023 #include "JackChannel.h"
00024
00025 namespace Jack
00026 {
00027
00032 class JackInternalClientChannel : public JackClientChannelInterface
00033 {
00034
00035 private:
00036
00037 JackServer* fServer;
00038 JackEngine* fEngine;
00039
00040 public:
00041
00042 JackInternalClientChannel(JackServer* server): fServer(server), fEngine(server->GetEngine())
00043 {}
00044 virtual ~JackInternalClientChannel()
00045 {}
00046
00047
00048 virtual int Open(const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status)
00049 {
00050 return 0;
00051 }
00052
00053 void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result)
00054 {
00055 *result = fEngine->ClientCheck(name, name_res, protocol, options, status);
00056 }
00057 void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
00058 {
00059 *result = fEngine->ClientInternalOpen(name, ref, shared_engine, shared_manager, client, true);
00060 }
00061 void ClientClose(int refnum, int* result)
00062 {
00063 *result = fEngine->ClientInternalClose(refnum, true);
00064 }
00065
00066 void ClientActivate(int refnum, int* result)
00067 {
00068 *result = fEngine->ClientActivate(refnum);
00069 }
00070 void ClientDeactivate(int refnum, int* result)
00071 {
00072 *result = fEngine->ClientDeactivate(refnum);
00073 }
00074
00075 void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index, int* result)
00076 {
00077 *result = fEngine->PortRegister(refnum, name, type, flags, buffer_size, port_index);
00078 }
00079 void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
00080 {
00081 *result = fEngine->PortUnRegister(refnum, port_index);
00082 }
00083
00084 void PortConnect(int refnum, const char* src, const char* dst, int* result)
00085 {
00086 *result = fEngine->PortConnect(refnum, src, dst);
00087 }
00088 void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
00089 {
00090 *result = fEngine->PortDisconnect(refnum, src, dst);
00091 }
00092
00093 void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00094 {
00095 *result = fEngine->PortConnect(refnum, src, dst);
00096 }
00097 void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00098 {
00099 *result = fEngine->PortDisconnect(refnum, src, dst);
00100 }
00101
00102 void SetBufferSize(jack_nframes_t buffer_size, int* result)
00103 {
00104 *result = fServer->SetBufferSize(buffer_size);
00105 }
00106 void SetFreewheel(int onoff, int* result)
00107 {
00108 *result = fServer->SetFreewheel(onoff);
00109 }
00110
00111 void ReleaseTimebase(int refnum, int* result)
00112 {
00113 *result = fServer->ReleaseTimebase(refnum);
00114 }
00115
00116 void SetTimebaseCallback(int refnum, int conditional, int* result)
00117 {
00118 *result = fServer->SetTimebaseCallback(refnum, conditional);
00119 }
00120
00121 };
00122
00123 }
00124
00125 #endif
00126