avahi  0.6.31
ga-client.h
Go to the documentation of this file.
1 /*
2  * ga-client.h - Header for GaClient
3  * Copyright (C) 2006-2007 Collabora Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __GA_CLIENT_H__
21 #define __GA_CLIENT_H__
22 
23 #include <glib-object.h>
24 #include <avahi-client/client.h>
25 
26 G_BEGIN_DECLS
27 
28 typedef enum {
36 
37 typedef enum {
42 
43 typedef struct _GaClient GaClient;
45 
47  GObjectClass parent_class;
48 };
49 
50 struct _GaClient {
51  GObject parent;
52  /* Raw avahi_client handle, only reuse if you have reffed this instance */
54 };
55 
56 GType ga_client_get_type(void);
57 
58 /* TYPE MACROS */
59 #define GA_TYPE_CLIENT \
60  (ga_client_get_type())
61 #define GA_CLIENT(obj) \
62  (G_TYPE_CHECK_INSTANCE_CAST((obj), GA_TYPE_CLIENT, GaClient))
63 #define GA_CLIENT_CLASS(klass) \
64  (G_TYPE_CHECK_CLASS_CAST((klass), GA_TYPE_CLIENT, GaClientClass))
65 #define IS_GA_CLIENT(obj) \
66  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GA_TYPE_CLIENT))
67 #define IS_GA_CLIENT_CLASS(klass) \
68  (G_TYPE_CHECK_CLASS_TYPE((klass), GA_TYPE_CLIENT))
69 #define GA_CLIENT_GET_CLASS(obj) \
70  (G_TYPE_INSTANCE_GET_CLASS ((obj), GA_TYPE_CLIENT, GaClientClass))
71 
73 
74 gboolean ga_client_start(GaClient * client, GError ** error);
75 
76 G_END_DECLS
77 
78 #endif /* #ifndef __GA_CLIENT_H__ */
struct AvahiClient AvahiClient
A connection context.
Definition: client.h:37
AvahiClient * avahi_client
Definition: ga-client.h:53
Don't read user configuration.
Definition: client.h:49
We're still connecting.
Definition: client.h:45
gboolean ga_client_start(GaClient *client, GError **error)
Server state: RUNNING.
Definition: client.h:42
GObject parent
Definition: ga-client.h:51
GObjectClass parent_class
Definition: ga-client.h:47
Some kind of error happened on the client side.
Definition: client.h:44
Server state: REGISTERING.
Definition: client.h:41
GaClientState
Definition: ga-client.h:28
Don't fail if the daemon is not available when avahi_client_new() is called, instead enter AVAHI_CLIE...
Definition: client.h:50
Server state: COLLISION.
Definition: client.h:43
GaClient * ga_client_new(GaClientFlags flags)
GaClientFlags
Definition: ga-client.h:37
Definitions and functions for the client API over D-Bus.
GType ga_client_get_type(void)