2
/* Ekiga -- A VoIP and 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 Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
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.
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.
39
#ifndef _H323_ENDPOINT_H_
40
#define _H323_ENDPOINT_H_
47
#include "opal-account.h"
48
#include "account-core.h"
55
class EndPoint : public H323EndPoint,
56
public Ekiga::CallProtocolManager,
57
public Ekiga::PresentityDecorator,
58
public Ekiga::AccountSubscriberImpl<Opal::Account>,
59
public Ekiga::ContactDecorator
61
PCLASSINFO(EndPoint, H323EndPoint);
64
EndPoint (CallManager &_manager, Ekiga::ServiceCore & core, unsigned listen_port);
67
/* ContactDecorator and PresentityDecorator */
68
bool populate_menu (Ekiga::Contact &contact,
69
const std::string uri,
70
Ekiga::MenuBuilder &builder);
72
bool populate_menu (Ekiga::Presentity& presentity,
73
const std::string uri,
74
Ekiga::MenuBuilder & builder);
76
bool menu_builder_add_actions (const std::string & fullname,
77
const std::string& uri,
78
Ekiga::MenuBuilder & builder);
81
/* CallProtocolManager */
82
bool dial (const std::string & uri);
84
const std::string & get_protocol_name () const;
86
void set_dtmf_mode (unsigned mode);
87
unsigned get_dtmf_mode () const;
89
bool set_listen_port (unsigned port);
90
const Ekiga::CallProtocolManager::Interface & get_listen_interface () const;
93
/* H.323 CallProtocolManager */
94
void set_forward_uri (const std::string & uri);
95
const std::string & get_forward_uri () const;
98
/* AccountSubscriber */
99
bool subscribe (const Opal::Account & account);
100
bool unsubscribe (const Opal::Account & account);
103
void Register (const Opal::Account & account);
106
bool UseGatekeeper (const PString & address = PString::Empty (),
107
const PString & domain = PString::Empty (),
108
const PString & iface = PString::Empty ());
110
bool RemoveGatekeeper (const PString & address);
112
bool IsRegisteredWithGatekeeper (const PString & address);
114
bool OnIncomingConnection (OpalConnection &connection,
116
OpalConnection::StringOptions *str_options);
118
void on_dial (std::string uri);
120
void on_transfer (std::string uri);
122
CallManager & manager;
123
Ekiga::ServiceCore & core;
124
Ekiga::Runtime & runtime;
125
Ekiga::AccountCore & account_core;
127
PMutex gk_name_mutex;
130
Ekiga::CallProtocolManager::Interface listen_iface;
132
std::string protocol_name;
133
std::string uri_prefix;
134
std::string forward_uri;
136
unsigned listen_port;