1.1 --- a/gmyth/src/gmyth_socket.h Thu Jun 14 18:19:52 2007 +0100
1.2 +++ b/gmyth/src/gmyth_socket.h Tue Jun 19 22:01:13 2007 +0100
1.3 @@ -52,77 +52,96 @@
1.4 typedef struct _GMythSocket GMythSocket;
1.5 typedef struct _GMythSocketClass GMythSocketClass;
1.6
1.7 -struct _GMythSocketClass
1.8 -{
1.9 - GObjectClass parent_class;
1.10 +struct _GMythSocketClass {
1.11 + GObjectClass parent_class;
1.12
1.13 - /* callbacks */
1.14 - /* no one for now */
1.15 + /*
1.16 + * callbacks
1.17 + */
1.18 + /*
1.19 + * no one for now
1.20 + */
1.21 };
1.22
1.23 -struct _GMythSocket
1.24 -{
1.25 - GObject parent;
1.26 +struct _GMythSocket {
1.27 + GObject parent;
1.28
1.29 - GMutex *mutex;
1.30 + GMutex *mutex;
1.31
1.32 - /* socket descriptor */
1.33 - gint sd;
1.34 - GIOChannel *sd_io_ch;
1.35 + /*
1.36 + * socket descriptor
1.37 + */
1.38 + gint sd;
1.39 + GIOChannel *sd_io_ch;
1.40
1.41 - gchar *hostname;
1.42 - gint port;
1.43 - gint mythtv_version;
1.44 + gchar *hostname;
1.45 + gint port;
1.46 + gint mythtv_version;
1.47 };
1.48
1.49 -/* used when no protocol version number was negotiated */
1.50 +/*
1.51 + * used when no protocol version number was negotiated
1.52 + */
1.53 #define MYTHTV_CANNOT_NEGOTIATE_VERSION 0
1.54
1.55 -GType gmyth_socket_get_type(void);
1.56 +GType gmyth_socket_get_type(void);
1.57
1.58 -GMythSocket *gmyth_socket_new();
1.59 +GMythSocket *gmyth_socket_new();
1.60
1.61 -GIOChannel *gmyth_socket_get_io_channel(GMythSocket * gmyth_socket);
1.62 +GIOChannel *gmyth_socket_get_io_channel(GMythSocket * gmyth_socket);
1.63
1.64 -gboolean gmyth_socket_is_able_to_read(GMythSocket * gmyth_socket);
1.65 -gboolean gmyth_socket_is_able_to_write(GMythSocket * gmyth_socket);
1.66 +gboolean gmyth_socket_is_able_to_read(GMythSocket * gmyth_socket);
1.67 +gboolean gmyth_socket_is_able_to_write(GMythSocket * gmyth_socket);
1.68
1.69 -gboolean gmyth_socket_send_command(GMythSocket * gmyth_socket,
1.70 - GString * command);
1.71 -GString *gmyth_socket_receive_response(GMythSocket * gmyth_socket);
1.72 -gint gmyth_socket_sendreceive_stringlist(GMythSocket * gmyth_socket,
1.73 - GMythStringList * str_list);
1.74 +gboolean gmyth_socket_send_command(GMythSocket * gmyth_socket,
1.75 + GString * command);
1.76 +GString *gmyth_socket_receive_response(GMythSocket * gmyth_socket);
1.77 +gint gmyth_socket_sendreceive_stringlist(GMythSocket *
1.78 + gmyth_socket,
1.79 + GMythStringList *
1.80 + str_list);
1.81
1.82 -gboolean gmyth_socket_connect(GMythSocket * gmyth_socket,
1.83 - const gchar * hostname, gint port);
1.84 -gboolean gmyth_socket_connect_with_timeout(GMythSocket * gmyth_socket,
1.85 - const gchar * hostname, gint port,
1.86 - guint timeout);
1.87 +gboolean gmyth_socket_connect(GMythSocket * gmyth_socket,
1.88 + const gchar * hostname, gint port);
1.89 +gboolean gmyth_socket_connect_with_timeout(GMythSocket *
1.90 + gmyth_socket,
1.91 + const gchar * hostname,
1.92 + gint port,
1.93 + guint timeout);
1.94
1.95 -gboolean gmyth_socket_connect_to_backend(GMythSocket * gmyth_socket,
1.96 - const gchar * hostname_backend,
1.97 - gint port, gboolean blocking_client);
1.98 +gboolean gmyth_socket_connect_to_backend(GMythSocket * gmyth_socket,
1.99 + const gchar *
1.100 + hostname_backend,
1.101 + gint port,
1.102 + gboolean blocking_client);
1.103
1.104 -gboolean gmyth_socket_connect_to_backend_events(GMythSocket * gmyth_socket,
1.105 - const gchar *
1.106 - hostname_backend, gint port,
1.107 - gboolean blocking_client);
1.108 +gboolean gmyth_socket_connect_to_backend_events(GMythSocket *
1.109 + gmyth_socket,
1.110 + const gchar *
1.111 + hostname_backend,
1.112 + gint port,
1.113 + gboolean
1.114 + blocking_client);
1.115
1.116 -gchar *gmyth_socket_get_primary_addr(void);
1.117 +gchar *gmyth_socket_get_primary_addr(void);
1.118
1.119 -GString *gmyth_socket_get_local_hostname(void);
1.120 +GString *gmyth_socket_get_local_hostname(void);
1.121
1.122 -void gmyth_socket_close_connection(GMythSocket * gmyth_socket);
1.123 +void gmyth_socket_close_connection(GMythSocket * gmyth_socket);
1.124
1.125 -gboolean gmyth_socket_check_protocol_version(GMythSocket * gmyth_socket);
1.126 -gint gmyth_socket_check_protocol_version_number(GMythSocket * gmyth_socket,
1.127 - gint mythtv_version);
1.128 +gboolean gmyth_socket_check_protocol_version(GMythSocket *
1.129 + gmyth_socket);
1.130 +gint gmyth_socket_check_protocol_version_number(GMythSocket *
1.131 + gmyth_socket,
1.132 + gint
1.133 + mythtv_version);
1.134
1.135 -gint gmyth_socket_get_protocol_version(GMythSocket * gmyth_socket);
1.136 +gint gmyth_socket_get_protocol_version(GMythSocket *
1.137 + gmyth_socket);
1.138
1.139 -gboolean gmyth_socket_write_stringlist(GMythSocket * gmyth_socket,
1.140 - GMythStringList * str_list);
1.141 -gint gmyth_socket_read_stringlist(GMythSocket * gmyth_socket,
1.142 - GMythStringList * str_list);
1.143 +gboolean gmyth_socket_write_stringlist(GMythSocket * gmyth_socket,
1.144 + GMythStringList * str_list);
1.145 +gint gmyth_socket_read_stringlist(GMythSocket * gmyth_socket,
1.146 + GMythStringList * str_list);
1.147 G_END_DECLS
1.148 -#endif /* __GMYTH_SOCKET_H__ */
1.149 +#endif /* __GMYTH_SOCKET_H__ */