summaryrefslogtreecommitdiff
path: root/gtk2_ardour/nsmclient.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-07-01 21:11:14 +0200
committerRobin Gareus <robin@gareus.org>2017-07-01 21:19:56 +0200
commitb976bf8986290e8f4812a50e7fdd98b9cbeb4249 (patch)
tree75cffb9761a024943c18e502a3d84e3607954a55 /gtk2_ardour/nsmclient.h
parent221902138938a47f32b925f7e37602230e9de538 (diff)
NO-OP whitespace & foratting of header files
Diffstat (limited to 'gtk2_ardour/nsmclient.h')
-rw-r--r--gtk2_ardour/nsmclient.h128
1 files changed, 63 insertions, 65 deletions
diff --git a/gtk2_ardour/nsmclient.h b/gtk2_ardour/nsmclient.h
index eea313d1f4..1fddd25b08 100644
--- a/gtk2_ardour/nsmclient.h
+++ b/gtk2_ardour/nsmclient.h
@@ -23,90 +23,88 @@
namespace NSM
{
+class Client
+{
+private:
- class Client
- {
-
- private:
-
- const char *nsm_url;
+ const char *nsm_url;
- lo_server _server;
- lo_server_thread _st;
- lo_address nsm_addr;
+ lo_server _server;
+ lo_server_thread _st;
+ lo_address nsm_addr;
- bool nsm_is_active;
- char *_nsm_client_id;
- char *_session_manager_name;
- char *_nsm_client_path;
+ bool nsm_is_active;
+ char *_nsm_client_id;
+ char *_session_manager_name;
+ char *_nsm_client_path;
- public:
+public:
- enum
- {
- ERR_OK = 0,
- ERR_GENERAL = -1,
- ERR_INCOMPATIBLE_API = -2,
- ERR_BLACKLISTED = -3,
- ERR_LAUNCH_FAILED = -4,
- ERR_NO_SUCH_FILE = -5,
- ERR_NO_SESSION_OPEN = -6,
- ERR_UNSAVED_CHANGES = -7,
- ERR_NOT_NOW = -8
- };
+ enum
+ {
+ ERR_OK = 0,
+ ERR_GENERAL = -1,
+ ERR_INCOMPATIBLE_API = -2,
+ ERR_BLACKLISTED = -3,
+ ERR_LAUNCH_FAILED = -4,
+ ERR_NO_SUCH_FILE = -5,
+ ERR_NO_SESSION_OPEN = -6,
+ ERR_UNSAVED_CHANGES = -7,
+ ERR_NOT_NOW = -8
+ };
- Client ( );
- virtual ~Client ( );
+ Client ();
+ virtual ~Client ();
- bool is_active ( void ) { return nsm_is_active; }
+ bool is_active (void) { return nsm_is_active; }
- const char *session_manager_name ( void ) { return _session_manager_name; }
- const char *client_id ( void ) { return _nsm_client_id; }
- const char *client_path ( void ) { return _nsm_client_path; }
+ const char *session_manager_name (void) { return _session_manager_name; }
+ const char *client_id (void) { return _nsm_client_id; }
+ const char *client_path (void) { return _nsm_client_path; }
- /* Client->Server methods */
- void is_dirty ( void );
- void is_clean ( void );
- void progress ( float f );
- void message( int priority, const char *msg );
- void announce ( const char *appliction_name, const char *capabilities, const char *process_name );
+ /* Client->Server methods */
+ void is_dirty (void);
+ void is_clean (void);
+ void progress (float f);
+ void message (int priority, const char *msg);
+ void announce (const char *appliction_name, const char *capabilities, const char *process_name);
- void broadcast ( lo_message msg );
+ void broadcast (lo_message msg);
- /* init without threading */
- int init ( const char *nsm_url );
- /* init with threading */
- int init_thread ( const char *nsm_url );
+ /* init without threading */
+ int init (const char *nsm_url);
+ /* init with threading */
+ int init_thread (const char *nsm_url);
- /* call this periodically to check for new messages */
- void check ( int timeout = 0 );
+ /* call this periodically to check for new messages */
+ void check (int timeout = 0);
- /* or call these to start and stop a thread (must do your own locking in handler!) */
- void start ( void );
- void stop ( void );
+ /* or call these to start and stop a thread (must do your own locking in handler!) */
+ void start (void);
+ void stop (void);
- protected:
+protected:
- /* Server->Client methods */
- virtual int command_open ( const char *name, const char *display_name, const char *client_id, char **out_msg ) = 0;
- virtual int command_save ( char **out_msg ) = 0;
+ /* Server->Client methods */
+ virtual int command_open (const char *name, const char *display_name, const char *client_id, char **out_msg) = 0;
+ virtual int command_save (char **out_msg) = 0;
- virtual void command_active ( bool ) { }
+ virtual void command_active (bool) {}
- virtual void command_session_is_loaded ( void ) { }
+ virtual void command_session_is_loaded (void) {}
- /* invoked when an unrecognized message is received. Should return 0 if you handled it, -1 otherwise. */
- virtual int command_broadcast ( const char *, lo_message ) { return -1; }
+ /* invoked when an unrecognized message is received. Should return 0 if you handled it, -1 otherwise. */
+ virtual int command_broadcast (const char *, lo_message) { return -1; }
- private:
+private:
- /* osc handlers */
- static int osc_open ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_save ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_announce_reply ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_error ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_session_is_loaded ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_broadcast ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
+ /* osc handlers */
+ static int osc_open (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data);
+ static int osc_save (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data);
+ static int osc_announce_reply (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data);
+ static int osc_error (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data);
+ static int osc_session_is_loaded (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data);
+ static int osc_broadcast (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data);
- };
+};
};