Merge branch 'master' into port_register_notification_defer
[jack2.git] / macosx / JackMacLibClientRPC.cpp
blobb70878a11178291508eb8c51fe9e4ce1c09a10b4
1 /*
2 Copyright (C) 2004-2008 Grame
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "JackLibClient.h"
21 #include "JackMachClientChannel.h"
22 #include "JackRPCEngine.h"
23 #include "JackLibGlobals.h"
24 #include <assert.h>
26 using namespace Jack;
28 #define rpc_type kern_return_t // for astyle
30 rpc_type rpc_jack_client_sync_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, message_t message, int value1, int value2, int* result)
32 jack_log("rpc_jack_client_sync_notify ref = %ld name = %s notify = %ld message %s val1 = %ld val2 = %ld", refnum, name, notify, message, value1, value2);
33 JackClient* client = gClientTable[client_port];
34 assert(client);
35 *result = client->ClientNotify(refnum, name, notify, true, message, value1, value2);
36 return KERN_SUCCESS;
39 rpc_type rpc_jack_client_async_notify(mach_port_t client_port, int refnum, client_name_t name, int notify, message_t message, int value1, int value2)
41 jack_log("rpc_jack_client_async_notify ref = %ld name = %s notify = %ld message %s val1 = %ld val2 = %ld", refnum, name, notify, message, value1, value2);
42 JackClient* client = gClientTable[client_port];
43 assert(client);
44 client->ClientNotify(refnum, name, notify, false, message, value1, value2);
45 return KERN_SUCCESS;