~ubuntu-branches/ubuntu/precise/rhythmbox/precise-201203091205

« back to all changes in this revision

Viewing changes to daapsharing/rb-daap-mdns-browser.h

Tags: upstream-0.9.5
ImportĀ upstreamĀ versionĀ 0.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 
2
 *
 
3
 *  Header for abstraction of Multicast DNS for DAAP sharing
 
4
 *
 
5
 *  Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
 
6
 *  Copyright (C) 2006 William Jon McCann <mccann@jhu.edu>
 
7
 *
 
8
 *  This program is free software; you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU General Public License as published by
 
10
 *  the Free Software Foundation; either version 2 of the License, or
 
11
 *  (at your option) any later version.
 
12
 *
 
13
 *  This program is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 *  GNU General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with this program; if not, write to the Free Software
 
20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
 
21
 *
 
22
 */
 
23
 
 
24
#ifndef __RB_DAAP_MDNS_BROWSER_H
 
25
#define __RB_DAAP_MDNS_BROWSER_H
 
26
 
 
27
#include <glib.h>
 
28
#include <glib-object.h>
 
29
 
 
30
G_BEGIN_DECLS
 
31
 
 
32
#define RB_TYPE_DAAP_MDNS_BROWSER         (rb_daap_mdns_browser_get_type ())
 
33
#define RB_DAAP_MDNS_BROWSER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_DAAP_MDNS_BROWSER, RBDaapMdnsBrowser))
 
34
#define RB_DAAP_MDNS_BROWSER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_DAAP_MDNS_BROWSER, RBDaapMdnsBrowserClass))
 
35
#define RB_IS_DAAP_MDNS_BROWSER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_DAAP_MDNS_BROWSER))
 
36
#define RB_IS_DAAP_MDNS_BROWSER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_DAAP_MDNS_BROWSER))
 
37
#define RB_DAAP_MDNS_BROWSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_DAAP_MDNS_BROWSER, RBDaapMdnsBrowserClass))
 
38
 
 
39
typedef struct RBDaapMdnsBrowserPrivate RBDaapMdnsBrowserPrivate;
 
40
 
 
41
typedef struct
 
42
{
 
43
        GObject object;
 
44
 
 
45
        RBDaapMdnsBrowserPrivate *priv;
 
46
} RBDaapMdnsBrowser;
 
47
 
 
48
typedef struct
 
49
{
 
50
        GObjectClass parent_class;
 
51
 
 
52
        void (* service_added)    (RBDaapMdnsBrowser *browser,
 
53
                                   const char        *service_name,
 
54
                                   const char        *name,
 
55
                                   const char        *host,
 
56
                                   guint              port,
 
57
                                   gboolean           password_protected);
 
58
        void (* service_removed ) (RBDaapMdnsBrowser *browser,
 
59
                                   const char        *service_name);
 
60
 
 
61
} RBDaapMdnsBrowserClass;
 
62
 
 
63
typedef enum
 
64
{
 
65
        RB_DAAP_MDNS_BROWSER_ERROR_NOT_RUNNING,
 
66
        RB_DAAP_MDNS_BROWSER_ERROR_FAILED,
 
67
} RBDaapMdnsBrowserError;
 
68
 
 
69
#define RB_DAAP_MDNS_BROWSER_ERROR rb_daap_mdns_browser_error_quark ()
 
70
 
 
71
GQuark             rb_daap_mdns_browser_error_quark (void);
 
72
 
 
73
GType              rb_daap_mdns_browser_get_type    (void);
 
74
 
 
75
RBDaapMdnsBrowser *rb_daap_mdns_browser_new         (void);
 
76
gboolean           rb_daap_mdns_browser_start       (RBDaapMdnsBrowser *browser,
 
77
                                                     GError           **error);
 
78
gboolean           rb_daap_mdns_browser_stop        (RBDaapMdnsBrowser *browser,
 
79
                                                     GError           **error);
 
80
 
 
81
G_END_DECLS
 
82
 
 
83
#endif /* __RB_DAAP_MDNS_BROWSER_H */
 
84
 
 
85