~ubuntu-branches/ubuntu/maverick/ekiga/maverick

« back to all changes in this revision

Viewing changes to src/endpoints/h323.h

  • Committer: Bazaar Package Importer
  • Author(s): Eugen Dedu, Eugen Dedu, Loic Minier
  • Date: 2008-09-27 10:00:00 UTC
  • mfrom: (1.1.8 upstream)
  • mto: (1.4.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20080927100000-l5k5werb6czr5b3h
Tags: 3.0.1-1
[ Eugen Dedu ]
* New version.  (Closes: #500089).
* Add our own changelog file in /usr/share/doc.
* Remove gnomemeeting transitional package.
* Discover new interfaces.  (Closes: #488199).
* Compile with dbus support.  (Closes: #467212).
* Numeric keypad inserts digits at correct position.  (Closes: #440159).
* Use libnotify upon call.  (Closes: #412604).
* Symlink identical GNOME help files, to reduce size.  (Closes: #505536).
* Explicitely build-depends on a few dev packages, even if they were
  pulled out anyway by the other dependencies.

[ Loic Minier ]
* Use clean:: instead of clean: in rules.
* Don't disable Uploaders: generation for control.in -> control generation
  in rules.
* Fix some tabs which were size 4 anyway.
* Generate a PO template during build by calling intltool-update -p in
  install; thanks Ubuntu and Martin Pitt; closes: #505535.
* Also let the -dbg depend on ${misc:Depends}.
* Cleanup rules; in particular, use dpkg-parsechangelog and honor
  distclean/clean failures, remove old clean rules, commented out stuff,
  gtk-only stuff.
* Pass -s to dh_* in binary-arch.
* Use debian/*.links and debian/*.manpages instead of symlink manually or
  passing files to dh_installman.
* Use ftp.gnome.org in copyright.
* Switch to quilt and fix target deps in the process; build-dep on quilt
  instead of dpatch; rename news.dpatch to 00_news.patch and refresh;
  replace 00list with series.
* Install autotools-dev config.guess and .sub after patching.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/* Ekiga -- A VoIP and Video-Conferencing application
3
 
 * Copyright (C) 2000-2006 Damien Sandras
4
 
 *
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.
9
 
 *
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.
14
 
 *
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 Foundation,
17
 
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
 
 *
19
 
 *
20
 
 * Ekiga 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 OPAL, OpenH323 and PWLIB, and distribute the combination,
23
 
 * without applying the requirements of the GNU GPL to the OPAL, OpenH323
24
 
 * and PWLIB programs, as long as you do follow the requirements of the
25
 
 * GNU GPL for all the rest of the software thus combined.
26
 
 */
27
 
 
28
 
 
29
 
/*
30
 
 *                         h323endpoint.h  -  description
31
 
 *                         ------------------------------
32
 
 *   begin                : Wed 24 Nov 2004
33
 
 *   copyright            : (C) 2000-2006 by Damien Sandras
34
 
 *   description          : This file contains the H.323 Endpoint class.
35
 
 *
36
 
 */
37
 
 
38
 
 
39
 
#ifndef _H323_ENDPOINT_H_
40
 
#define _H323_ENDPOINT_H_
41
 
 
42
 
 
43
 
#include "../../config.h"
44
 
 
45
 
#include "common.h"
46
 
 
47
 
#include "manager.h"
48
 
 
49
 
 
50
 
/* Minimal H.323 endpoint implementation */
51
 
class GMH323Endpoint : public H323EndPoint
52
 
{
53
 
  PCLASSINFO(GMH323Endpoint, H323EndPoint);
54
 
 
55
 
 public:
56
 
 
57
 
  /* DESCRIPTION  :  The constructor.
58
 
   * BEHAVIOR     :  Creates the H.323 Endpoint 
59
 
   *                 and initialises the variables
60
 
   * PRE          :  /
61
 
   */
62
 
  GMH323Endpoint (GMManager &ep);
63
 
 
64
 
  
65
 
  /* DESCRIPTION  :  The destructor.
66
 
   * BEHAVIOR     :  /
67
 
   * PRE          :  /
68
 
   */
69
 
  ~GMH323Endpoint ();
70
 
  
71
 
  
72
 
  /* DESCRIPTION  :  /
73
 
   * BEHAVIOR     :  Init the endpoint internal values and the various
74
 
   *                 components.
75
 
   * PRE          :  /
76
 
   */
77
 
  void Init ();
78
 
  
79
 
  
80
 
  /* DESCRIPTION  :  /
81
 
   * BEHAVIOR     :  Starts the listener thread on the port choosen 
82
 
   *                 in the options after having removed old listeners.
83
 
   *                 returns TRUE if success and FALSE in case of error.
84
 
   * PRE          :  The interface.
85
 
   */
86
 
  BOOL StartListener (PString iface, 
87
 
                      WORD port);
88
 
 
89
 
  
90
 
  /* DESCRIPTION  :  /
91
 
   * BEHAVIOR     :  Set the local user name following the firstname and last 
92
 
   *                 name stored by the conf, set the gatekeeper alias, 
93
 
   *                 possibly as first alias.
94
 
   * PRE          :  /
95
 
   */
96
 
  void SetUserNameAndAlias ();
97
 
 
98
 
  
99
 
  /* DESCRIPTION  :  /
100
 
   * BEHAVIOR     :  Adds the User Input Mode following the
101
 
   *                 configuration options. String, Tone, and RFC2833 are 
102
 
   *                 supported for now.
103
 
   * PRE          :  /
104
 
   */
105
 
  void SetUserInputMode ();
106
 
  
107
 
  
108
 
  /* DESCRIPTION  :  /
109
 
   * BEHAVIOR     :  Use the given gatekeeper.
110
 
   * PRE          :  /
111
 
   */
112
 
  BOOL UseGatekeeper (const PString & address = PString::Empty (),
113
 
                      const PString & domain = PString::Empty (),
114
 
                      const PString & iface = PString::Empty ());
115
 
  
116
 
 
117
 
  /* DESCRIPTION  :  /
118
 
   * BEHAVIOR     :  Remove the given gatekeeper if we were registered to it.
119
 
   *                 Returns TRUE if it worked.
120
 
   * PRE          :  Non-Empty address.
121
 
   */
122
 
  BOOL RemoveGatekeeper (const PString & address);
123
 
  
124
 
  
125
 
  /* DESCRIPTION  :  /
126
 
   * BEHAVIOR     :  Returns TRUE if we are registered with 
127
 
   *                 the given gatekeeper.
128
 
   * PRE          :  Non-Empty address.
129
 
   */
130
 
  BOOL IsRegisteredWithGatekeeper (const PString & address);
131
 
  
132
 
 
133
 
  /* DESCRIPTION  :  Called when there is an incoming SIP connection.
134
 
   * BEHAVIOR     :  Checks if the connection must be rejected or forwarded
135
 
   *                 and call the manager function of the same name
136
 
   *                 to update the GUI and take the appropriate action
137
 
   *                 on the connection. If the connection is not forwarded,
138
 
   *                 or rejected, OnShowIncoming will be called on the PCSS
139
 
   *                 endpoint, allowing to auto-answer the call or do further
140
 
   *                 updates of the GUI and internal timers.
141
 
   * PRE          :  /
142
 
   */
143
 
  BOOL OnIncomingConnection (OpalConnection &connection);
144
 
 
145
 
 
146
 
  /* DESCRIPTION  :  Called when the gatekeeper accepts the registration.
147
 
   * BEHAVIOR     :  Update the endpoint state.
148
 
   * PRE          :  /
149
 
   */
150
 
  void OnRegistrationConfirm ();
151
 
 
152
 
  
153
 
  /* DESCRIPTION  :  Called when the gatekeeper rejects the registration.
154
 
   * BEHAVIOR     :  Update the endpoint state.
155
 
   * PRE          :  /
156
 
   */
157
 
  void OnRegistrationReject ();
158
 
 
159
 
  
160
 
  /* DESCRIPTION  :  This callback is called when the connection is 
161
 
   *                 established and everything is ok.
162
 
   * BEHAVIOR     :  Stops the timers.
163
 
   * PRE          :  /
164
 
   */
165
 
  void OnEstablished (OpalConnection &);
166
 
 
167
 
  
168
 
  /* DESCRIPTION  :  This callback is called when a connection to a remote
169
 
   *                 endpoint is cleared.
170
 
   * BEHAVIOR     :  Stops the timers.
171
 
   * PRE          :  /
172
 
   */
173
 
  void OnReleased (OpalConnection &);
174
 
 
175
 
 
176
 
 private:
177
 
  
178
 
  /* DESCRIPTION  :  Notifier called when an incoming call
179
 
   *                 has not been answered in the required time.
180
 
   * BEHAVIOR     :  Reject the call, or forward if forward on no answer is
181
 
   *                 enabled in the config database.
182
 
   * PRE          :  /
183
 
   */
184
 
  PDECLARE_NOTIFIER(PTimer, GMH323Endpoint, OnNoAnswerTimeout);
185
 
 
186
 
  PTimer NoAnswerTimer;
187
 
 
188
 
 
189
 
  GMManager & endpoint;
190
 
  PMutex gk_name_mutex;
191
 
  PString gk_name;
192
 
};
193
 
 
194
 
#endif