Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
sfigluecodec.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __SFI_GLUE_CODEC_H__
3 #define __SFI_GLUE_CODEC_H__
4 
5 #include <sfi/sfiglue.hh>
6 #include <sfi/sficomport.hh>
7 
8 
9 /* --- encoder API --- */
10 typedef struct
11 {
12  SfiGlueContext context;
13  SfiComPort *port;
14  /*< private >*/
15  GValue svalue;
16  SfiRing *events;
18 /* encode glue layer API calls and pass them on to remote server */
19 SfiGlueContext* sfi_glue_encoder_context (SfiComPort *port);
20 
21 
22 /* --- decoder API --- */
23 typedef struct _SfiGlueDecoder SfiGlueDecoder;
24 typedef GValue* (*SfiGlueDecoderClientMsg) (SfiGlueDecoder *decoder,
25  gpointer user_data,
26  const gchar *message,
27  const GValue *value);
29 {
30  /*< private >*/
31  SfiGlueContext *context;
32  SfiComPort *port;
33  GValue *incoming;
34  SfiRing *outgoing;
35  guint n_chandler;
36  struct ClientMsg {
37  SfiGlueDecoderClientMsg client_msg;
38  gpointer user_data;
39  } *chandler;
40 };
41 /* receive encoded requests and dispatch them onto a given context */
42 SfiGlueDecoder* sfi_glue_context_decoder (SfiComPort *port,
43  SfiGlueContext *context);
44 void sfi_glue_decoder_add_handler (SfiGlueDecoder *decoder,
45  SfiGlueDecoderClientMsg func,
46  gpointer user_data);
47 SfiRing* sfi_glue_decoder_list_poll_fds (SfiGlueDecoder *decoder);
48 gboolean sfi_glue_decoder_pending (SfiGlueDecoder *decoder);
49 void sfi_glue_decoder_dispatch (SfiGlueDecoder *decoder);
50 void sfi_glue_decoder_destroy (SfiGlueDecoder *decoder);
51 
52 
53 /* --- implementation details --- */
54 typedef enum /*< skip >*/
55 {
56  SFI_GLUE_CODEC_ASYNC_RETURN = 1,
57  SFI_GLUE_CODEC_ASYNC_MESSAGE,
58  SFI_GLUE_CODEC_ASYNC_EVENT,
59  SFI_GLUE_CODEC_DESCRIBE_IFACE = 129,
60  SFI_GLUE_CODEC_DESCRIBE_PROC,
61  SFI_GLUE_CODEC_LIST_PROC_NAMES,
62  SFI_GLUE_CODEC_LIST_METHOD_NAMES,
63  SFI_GLUE_CODEC_BASE_IFACE,
64  SFI_GLUE_CODEC_IFACE_CHILDREN,
65  SFI_GLUE_CODEC_EXEC_PROC,
66  SFI_GLUE_CODEC_PROXY_IFACE,
67  SFI_GLUE_CODEC_PROXY_IS_A,
68  SFI_GLUE_CODEC_PROXY_LIST_PROPERTIES,
69  SFI_GLUE_CODEC_PROXY_GET_PSPEC,
70  SFI_GLUE_CODEC_PROXY_GET_PSPEC_SCATEGORY,
71  SFI_GLUE_CODEC_PROXY_SET_PROPERTY, /* one-way */
72  SFI_GLUE_CODEC_PROXY_GET_PROPERTY,
73  SFI_GLUE_CODEC_PROXY_WATCH_RELEASE,
74  SFI_GLUE_CODEC_PROXY_REQUEST_NOTIFY,
75  SFI_GLUE_CODEC_PROXY_PROCESSED_NOTIFY, /* one-way */
76  SFI_GLUE_CODEC_CLIENT_MSG
77 } SfiGlueCodecCommands;
78 
79 
80 
81 #endif /* __SFI_GLUE_CODEC_H__ */
82 
83 /* vim:set ts=8 sts=2 sw=2: */
Definition: sfigluecodec.hh:28
Definition: sficomport.hh:14
Definition: sfigluecodec.hh:36
Definition: sfiring.hh:21
Definition: sfigluecodec.hh:10