~ubuntu-branches/ubuntu/jaunty/ekiga/jaunty-updates

« back to all changes in this revision

Viewing changes to src/endpoints/h323-endpoint.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-12-07 10:30:45 UTC
  • mfrom: (1.2.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20081207103045-iaurrjo4p7d1nngo
Tags: 3.0.1-1ubuntu1
* Merge to Debian experimental, to get Ekiga 3. (LP: #274085) Remaining
  Ubuntu changes:
  - Launchpad Integration: (Ubuntu specific)
    + debian/control.in: Add liblaunchpad-integration-dev build dependency.
    + Add ubuntu_lpi.patch: Call launchpad_integration_add_items() in main() and
      check for the launchpad-integration pkg-config module.
    + Add autoconf.patch: autoconf changes from above patch.
  - Add ubuntu_desktop-file-onlyshowin.patch: Show ekiga in Mobile, too.
    (Ubuntu specific).
  - debian/control.in: Add missing fdupes build dependency for identical
    GNOME help file symlinking. (Debian #505536)
* Drop 42_change_pixmaps.dpatch: Many of the old icons do not exist any
  more, some have been replaced, and keeping the remaining three would make
  them look very inconsistent.
* Convert our dpatches to quilt patches and rewrite them for new upstream
  version.
* Add migrate_2.0_settings.patch: Properly migrate settings from
  2.0. Taken from upstream SVN, thanks to Damien Sandras!

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 exc_managertion,
 
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
#include "config.h"
 
43
 
 
44
#include "common.h"
 
45
 
 
46
#include "manager.h"
 
47
#include "opal-account.h"
 
48
#include "account-core.h"
 
49
 
 
50
 
 
51
namespace Opal {
 
52
 
 
53
  namespace H323 {
 
54
 
 
55
    class EndPoint : public H323EndPoint,
 
56
                                public Ekiga::CallProtocolManager,
 
57
                                public Ekiga::PresentityDecorator,
 
58
                                public Ekiga::AccountSubscriberImpl<Opal::Account>,
 
59
                                public Ekiga::ContactDecorator
 
60
    {
 
61
      PCLASSINFO(EndPoint, H323EndPoint);
 
62
 
 
63
  public:
 
64
      EndPoint (CallManager &_manager, Ekiga::ServiceCore & core, unsigned listen_port);
 
65
 
 
66
 
 
67
      /* ContactDecorator and PresentityDecorator */
 
68
      bool populate_menu (Ekiga::Contact &contact,
 
69
                          const std::string uri,
 
70
                          Ekiga::MenuBuilder &builder);
 
71
 
 
72
      bool populate_menu (Ekiga::Presentity& presentity,
 
73
                          const std::string uri,
 
74
                          Ekiga::MenuBuilder & builder);
 
75
 
 
76
      bool menu_builder_add_actions (const std::string & fullname,
 
77
                                     const std::string& uri,
 
78
                                     Ekiga::MenuBuilder & builder);
 
79
 
 
80
 
 
81
      /* CallProtocolManager */
 
82
      bool dial (const std::string & uri); 
 
83
 
 
84
      const std::string & get_protocol_name () const;
 
85
 
 
86
      void set_dtmf_mode (unsigned mode);
 
87
      unsigned get_dtmf_mode () const;
 
88
 
 
89
      bool set_listen_port (unsigned port);
 
90
      const Ekiga::CallProtocolManager::Interface & get_listen_interface () const;
 
91
 
 
92
 
 
93
      /* H.323 CallProtocolManager */
 
94
      void set_forward_uri (const std::string & uri);
 
95
      const std::string & get_forward_uri () const;
 
96
 
 
97
 
 
98
      /* AccountSubscriber */
 
99
      bool subscribe (const Opal::Account & account);
 
100
      bool unsubscribe (const Opal::Account & account);
 
101
 
 
102
      /* OPAL methods */
 
103
      void Register (const Opal::Account & account);
 
104
 
 
105
  private:
 
106
      bool UseGatekeeper (const PString & address = PString::Empty (),
 
107
                          const PString & domain = PString::Empty (),
 
108
                          const PString & iface = PString::Empty ());
 
109
 
 
110
      bool RemoveGatekeeper (const PString & address);
 
111
 
 
112
      bool IsRegisteredWithGatekeeper (const PString & address);
 
113
 
 
114
      bool OnIncomingConnection (OpalConnection &connection,
 
115
                                 unsigned options,
 
116
                                 OpalConnection::StringOptions *str_options);
 
117
 
 
118
      void on_dial (std::string uri);
 
119
 
 
120
      void on_transfer (std::string uri);
 
121
 
 
122
      CallManager & manager;
 
123
      Ekiga::ServiceCore & core;
 
124
      Ekiga::Runtime & runtime;
 
125
      Ekiga::AccountCore & account_core;
 
126
 
 
127
      PMutex gk_name_mutex;
 
128
      PString gk_name;
 
129
 
 
130
      Ekiga::CallProtocolManager::Interface listen_iface;
 
131
 
 
132
      std::string protocol_name;
 
133
      std::string uri_prefix;
 
134
      std::string forward_uri;
 
135
 
 
136
      unsigned listen_port;
 
137
    };
 
138
  };
 
139
};
 
140
#endif