diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2016-02-16 15:55:06 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2016-02-16 15:55:06 +0100 |
commit | 7b18a105db637d1ea625bd41f35e52df41165fa3 (patch) | |
tree | 7be5d2e74c5e0aa2bda5c96606ebcaacb11c2715 /uca-net-client.c | |
parent | badc0cac8bd6c1997ac89b05bfe51976fe81d60a (diff) | |
download | uca-net-7b18a105db637d1ea625bd41f35e52df41165fa3.tar.gz uca-net-7b18a105db637d1ea625bd41f35e52df41165fa3.tar.bz2 uca-net-7b18a105db637d1ea625bd41f35e52df41165fa3.tar.xz uca-net-7b18a105db637d1ea625bd41f35e52df41165fa3.zip |
Add readout and trigger API
Diffstat (limited to 'uca-net-client.c')
-rw-r--r-- | uca-net-client.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/uca-net-client.c b/uca-net-client.c index c92eedd..471d039 100644 --- a/uca-net-client.c +++ b/uca-net-client.c @@ -134,22 +134,37 @@ uca_net_client_set_property (GSocketConnection *connection, const gchar *name, c return handle_default_reply (connection, UCA_NET_MESSAGE_SET_PROPERTY, error); } -void -uca_net_client_start_recording (GSocketConnection *connection, GError **error) +static void +default_handshake (GSocketConnection *connection, UcaNetMessageType type, GError **error) { - if (!send_default_message (connection, UCA_NET_MESSAGE_START_RECORDING, error)) + if (!send_default_message (connection, type, error)) return; - handle_default_reply (connection, UCA_NET_MESSAGE_START_RECORDING, error); + handle_default_reply (connection, type, error); +} + +void +uca_net_client_start_recording (GSocketConnection *connection, GError **error) +{ + default_handshake (connection, UCA_NET_MESSAGE_START_RECORDING, error); } void uca_net_client_stop_recording (GSocketConnection *connection, GError **error) { - if (!send_default_message (connection, UCA_NET_MESSAGE_STOP_RECORDING, error)) - return; + default_handshake (connection, UCA_NET_MESSAGE_STOP_RECORDING, error); +} - handle_default_reply (connection, UCA_NET_MESSAGE_STOP_RECORDING, error); +void +uca_net_client_start_readout (GSocketConnection *connection, GError **error) +{ + default_handshake (connection, UCA_NET_MESSAGE_START_READOUT, error); +} + +void +uca_net_client_stop_readout (GSocketConnection *connection, GError **error) +{ + default_handshake (connection, UCA_NET_MESSAGE_STOP_READOUT, error); } gboolean |