2
/* GnomeMeeting -- A Video-Conferencing application
3
* Copyright (C) 2000-2006 Damien Sandras
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program 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
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
* GnomeMeting is licensed under the GPL license and as a special exception,
21
* you have permission to link or otherwise combine this program with the
22
* programs OpenH323 and Pwlib, and distribute the combination, without
23
* applying the requirements of the GNU GPL to the OpenH323 program, as long
24
* as you do follow the requirements of the GNU GPL for all the rest of the
25
* software thus combined.
29
* avahi_publish.h - description
30
* ------------------------------------
31
* begin : Sun Aug 21 2005
32
* copyright : (C) 2005 by Sebastien Estienne
33
* description : This file contains the Avahi zeroconf publisher.
40
#ifndef _AVAHI_PUBLISHER_H_
41
#define _AVAHI_PUBLISHER_H_
43
#include <avahi-client/client.h>
44
#include <avahi-client/publish.h>
45
#include <avahi-common/alternative.h>
46
#include <avahi-common/malloc.h>
47
#include <avahi-common/error.h>
48
#include <avahi-common/timeval.h>
49
#include <avahi-glib/glib-watch.h>
52
/* Zeroconf Service Type */
53
#define ZC_H323 "_h323._tcp"
54
#define ZC_SIP "_sip._udp"
59
class GMZeroconfPublisher
65
* BEHAVIOR : ZeroconfPublisher constructor
66
* - insert Avahi in Gnomemeeting Mainloop
67
* - initialization of some variables
70
GMZeroconfPublisher (GMManager &);
73
/* DESCRIPTION : ZeroconfPublisher destructor
75
* - Free avahi Client and Entry group
76
* - Stop publishing the gnomemeeting zeroconf service
80
~GMZeroconfPublisher ();
84
* BEHAVIOR : Return -1 when error occured, 0 if no error.
85
* Publish the gnomemeeting zeroconf service
86
* with data store in class attributes info.
87
* PRE : Start() method must be called before Publish ().
92
void ClientCallback (AvahiClient *c,
93
AvahiClientState state,
97
int CreateServices (AvahiClient *c,
101
void EntryGroupCallback (AvahiEntryGroup *group,
102
AvahiEntryGroupState state,
108
AvahiEntryGroup *group;
110
char *name; /* Srv Record */
112
AvahiStringList *h323_text_record; /* H323 Txt Record */
113
AvahiStringList *sip_text_record; /* Sip Txt Record */
115
uint16_t h323_port; /* port number of Srv Record */
116
uint16_t sip_port; /* port number of Srv Record */
118
AvahiGLibPoll *glib_poll;
119
const AvahiPoll *poll_api;
122
* BEHAVIOR : Return err=SW_OKAY when no error occured.
123
* Retrieve user personal data from gmconf
124
* to class attributes info.
125
* PRE : must be call to update personal data
127
int GetPersonalData();