~noskcaj/ubuntu/trusty/ekiga/ftbfs

« back to all changes in this revision

Viewing changes to src/endpoints/accountshandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-01-28 18:49:20 UTC
  • Revision ID: james.westby@ubuntu.com-20060128184920-v525ihmiv7id40xs
Tags: upstream-1.99.0
ImportĀ upstreamĀ versionĀ 1.99.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* GnomeMeeting -- A 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
 
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 *
 
19
 *
 
20
 * GnomeMeeting 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.
 
26
 */
 
27
 
 
28
 
 
29
/*
 
30
 *                         accounts_manager.h  -  description
 
31
 *                         ----------------------------------
 
32
 *   begin                : Sun Feb 13 2005
 
33
 *   copyright            : (C) 2000-2006 by Damien Sandras
 
34
 *   description          : This file contains all the functions needed to
 
35
 *                          manipulate H.323/SIP/... provider accounts.
 
36
 */
 
37
 
 
38
 
 
39
#ifndef _ACCOUNTS_MANAGER_H_
 
40
#define _ACCOUNTS_MANAGER_H_
 
41
 
 
42
#include "common.h"
 
43
#include "accounts.h"
 
44
 
 
45
class GMManager;
 
46
 
 
47
 
 
48
/* Class to register accounts in a thread.
 
49
 * SIP Accounts are registered asynchronously, H.323 accounts
 
50
 * are registered synchronously.
 
51
 */
 
52
class GMAccountsEndpoint : public PThread
 
53
{
 
54
  PCLASSINFO(GMAccountsEndpoint, PThread);
 
55
 
 
56
 
 
57
public:
 
58
 
 
59
  /* DESCRIPTION  :  The constructor.
 
60
   * BEHAVIOR     :  Initialise the parameters and launches the registration
 
61
   *                 thread. If an account is specified, only that account
 
62
   *                 is updated and the thread exits.
 
63
   *                 If no account is specified, the 
 
64
   *                 GMAccountsEndpoint will refresh the state for all accounts
 
65
   *                 specified in the GmConfig.
 
66
   * PRE          :  /
 
67
   */
 
68
  GMAccountsEndpoint (GmAccount *,
 
69
                     GMManager &);
 
70
 
 
71
 
 
72
  /* DESCRIPTION  :  The destructor.
 
73
   * BEHAVIOR     :  /
 
74
   * PRE          :  /
 
75
   */
 
76
  ~GMAccountsEndpoint ();
 
77
 
 
78
 
 
79
  /* DESCRIPTION  :  /
 
80
   * BEHAVIOR     :  Updates the registration status for the given account
 
81
   *                 or for all accounts. STUN is used if configured.
 
82
   * PRE          :  /
 
83
   */
 
84
  void Main ();
 
85
 
 
86
 
 
87
  /* DESCRIPTION  :  /
 
88
   * BEHAVIOR     :  Updates the registration for a SIP GmAccount.
 
89
   * PRE          :  A valid pointer to a valid SIP GmAccount.
 
90
   */
 
91
  void SIPRegister (GmAccount *);
 
92
 
 
93
  
 
94
  /* DESCRIPTION  :  /
 
95
   * BEHAVIOR     :  Updates the registration for a H.323 GmAccount.
 
96
   * PRE          :  A valid pointer to a valid H.323 GmAccount.
 
97
   */
 
98
  void H323Register (GmAccount *);
 
99
  
 
100
protected:
 
101
 
 
102
 
 
103
  GmAccount *account;
 
104
 
 
105
  PMutex quit_mutex;
 
106
  PSyncPoint thread_sync_point;
 
107
 
 
108
  GMManager & ep;
 
109
};
 
110
 
 
111
#endif