~ubuntu-branches/ubuntu/karmic/ekiga/karmic

« back to all changes in this revision

Viewing changes to lib/engine/presence/local-roster/local-heap.h

  • Committer: Bazaar Package Importer
  • Author(s): Ken VanDine
  • Date: 2009-03-17 15:14:12 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090317151412-no6uq0wl8zz2hsw3
Tags: 3.2.0-0ubuntu1
* New upstream release (LP: #341367)
  - Better NAT support in case of Cone NAT
  - Uniformise detection of libnotify; fix compilation with mingw
  - Fix "URL completion combobox shows identical completions"
  - Fix "Assistant loosing values when going backward"
  - Fix GmConf settings when compiled with another package name
  - Fix unregistration of accounts
  - Fix build with --enable-kde
  - Fixed possible crash when retrieving presence information
  - New translations: crh, or
  - Updated translations: as, bg, bn_IN, da, de, el, eu, gl, gu, hi, hu,
    ja, kn, ko, ku, lt, ml, mr, or, pt, ro, ru, ta, te, tr
  - New help translation: en_GB
  - Updated help translation: fr
  - Better NAT support in case of Cone NAT
  - There is now only one H.263 plugin implementing both H.263 and H.263+
  - Allow several ALSA devices to have the same name
  - Added support for the G.722 audio codec: G.722 is a 16 kHz wideband
    audio codec advertised as HD Voice by the famous Polycom. It is a
    great boost in quality and interoperability
  - Added support for the CELT ultral-low delay audio codec: CELT delivers
    high quality audio at 32 kHz or 48 kHz, allowing to transmit music in
    high quality, with low delay and low bitrate
  - Added support for SIP dialog-info notifications: they allow displaying
    notifications of incoming calls in the roster. With software like
    kamailio or Asterisk, it allows being informed of incoming calls
    reaching your colleagues
  - Largely improved LDAP support: the OpenLDAP guys contributed several
    patches to provide state-of-the-art LDAP support in the Ekiga address
    book. The new code even supports authentication
  - Killed the gconf_test_age test, Ekiga can now finally work with
    badly installed GConf schemas
  - Better handling of multiple network interfaces with dynamic addition
    and removal
  - Added settings migration from Ekiga 2.0.x.
  - Other various fixes, cleanups, removal of deprecated symbols etc.
  - New translations: crh, or
  - New help translation: en_GB, eu
  - Updated many translations and help
  - Experimental features:
    * Significant improvements in IPv6 support
    * Gstreamer audio and video capture support near to be finished...
* debian/patches/migrate_2.0_settings.patch:
  - Removed, migration is now upstream
* debian/patches/00_news.patch
  - Removed
* debian/patches/ubuntu_lpi.patch:
  - Modified to work with 3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/*
3
 
 * Ekiga -- A VoIP and Video-Conferencing application
4
 
 * Copyright (C) 2000-2007 Damien Sandras
5
 
 
6
 
 * This program is free software; you can  redistribute it and/or modify
7
 
 * it under the terms of the GNU General Public License as published by
8
 
 * the Free Software Foundation; either version 2 of the License, or (at
9
 
 * your option) any later version. This program is distributed in the hope
10
 
 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
11
 
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
 
 * See the GNU General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU General Public License along
15
 
 * with this program; if not, write to the Free Software Foundation, Inc.,
16
 
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
17
 
 *
18
 
 * Ekiga is licensed under the GPL license and as a special exception, you
19
 
 * have permission to link or otherwise combine this program with the
20
 
 * programs OPAL, OpenH323 and PWLIB, and distribute the combination, without
21
 
 * applying the requirements of the GNU GPL to the OPAL, OpenH323 and PWLIB
22
 
 * programs, as long as you do follow the requirements of the GNU GPL for all
23
 
 * the rest of the software thus combined.
24
 
 */
25
 
 
26
 
 
27
 
/*
28
 
 *                         local-heap.h  -  description
29
 
 *                         ------------------------------------------
30
 
 *   begin                : written in 2007 by Julien Puydt
31
 
 *   copyright            : (c) 2007 by Julien Puydt
32
 
 *   description          : declaration of the heap for the local roster
33
 
 *
34
 
 */
35
 
 
36
 
 
37
 
#ifndef __LOCAL_HEAP_H__
38
 
#define __LOCAL_HEAP_H__
39
 
 
40
 
#include <libxml/tree.h>
41
 
 
42
 
#include "heap-impl.h"
43
 
#include "local-presentity.h"
44
 
 
45
 
 
46
 
namespace Local
47
 
{
48
 
/**
49
 
 * @addtogroup presence
50
 
 * @internal
51
 
 * @{
52
 
 */
53
 
 
54
 
  /**
55
 
   * This class implements an Ekiga::Heap.
56
 
   *
57
 
   * The Heap is internally represented by an XML document with all
58
 
   * presentities, and the groups they belong to.
59
 
   *
60
 
   * The parent class is responsible of emitting the appropriate
61
 
   * signals defined in heap.h through the use of global implementations
62
 
   * coded in heap-imp.h.
63
 
   *
64
 
   * When required, the Heap content is being saved in a GmConf entry.
65
 
   * Alternatively, it could be saved elsewhere.
66
 
   */
67
 
  class Heap : public Ekiga::HeapImpl<Presentity>
68
 
  {
69
 
  public:
70
 
 
71
 
    /** The constructor.
72
 
     * @param: The Ekiga::ServiceCore to use to trigger operations on other
73
 
     * components.
74
 
     */
75
 
    Heap (Ekiga::ServiceCore &_core);
76
 
 
77
 
 
78
 
    /** The destructor.
79
 
     */
80
 
    ~Heap ();
81
 
 
82
 
 
83
 
    /** Return the name of the Heap. Inherits from Ekiga::Heap.
84
 
     * @return: The name of the Heap.
85
 
     */
86
 
    const std::string get_name () const;
87
 
 
88
 
 
89
 
    /** Populates the given Ekiga::MenuBuilder with the actions.
90
 
     * Inherited from Ekiga::Heap.
91
 
     * @param: A MenuBuilder.
92
 
     * @return: A populated menu.
93
 
     */
94
 
    bool populate_menu (Ekiga::MenuBuilder &);
95
 
 
96
 
 
97
 
    /** Populates the given Ekiga::MenuBuilder with the actions.
98
 
     * Inherited from Ekiga::Heap.
99
 
     * @param: The name of the group on which to act.
100
 
     * @param: A MenuBuilder.
101
 
     * @return: A populated menu.
102
 
     */
103
 
    bool populate_menu_for_group (const std::string name,
104
 
                                  Ekiga::MenuBuilder& builder);
105
 
 
106
 
 
107
 
    /** Determines if the given uri is already present in the Heap.
108
 
     * @param: A string representing an uri.
109
 
     * @return: TRUE if that uri is already present in the Heap.
110
 
     */
111
 
    bool has_presentity_with_uri (const std::string uri) const;
112
 
 
113
 
 
114
 
    /** Returns the list of all groups already in used in the Heap.
115
 
     * @return: A list of groups.
116
 
     */
117
 
    const std::set<std::string> existing_groups () const;
118
 
 
119
 
 
120
 
    /** This function should be called when a new presentity has
121
 
     * to be added to the Heap. It uses a form with the known
122
 
     * fields already filled in.
123
 
     * @param: The name and uri of the presentity.
124
 
     * @return: TRUE if that uri is already present in the Heap.
125
 
     */
126
 
    void new_presentity (const std::string name,
127
 
                         const std::string uri);
128
 
 
129
 
 
130
 
  private:
131
 
 
132
 
    /** Build a presentity with the given name, uri
133
 
     * and groups, add it to the internal XML document
134
 
     * and calls common_add for that presentity.
135
 
     */
136
 
    void add (const std::string name,
137
 
              const std::string uri,
138
 
              const std::set<std::string> groups);
139
 
 
140
 
 
141
 
    /** Build a presentity pointed by the xmlNodePtr
142
 
     * to the internal XML document and calls common_add.
143
 
     * The internal XML document is supposed to be up
144
 
     * to date.
145
 
     */
146
 
    void add (xmlNodePtr node);
147
 
 
148
 
 
149
 
    /** Add the Presentity to the Ekiga::Heap.
150
 
     *
151
 
     * This will trigger the 'presentity_added' signal,
152
 
     * and connect it to the public Ekiga::Heap 'removed'
153
 
     * and 'updated' signals.
154
 
     *
155
 
     * It will also ask the PresenceCore to fetch presence
156
 
     * information for the newly added presentity.
157
 
     *
158
 
     * It will also connect the GmConf::Presentity
159
 
     * 'save' and 'remove' signals which are specific to the
160
 
     * GmConf::Presentity to the save and remove methods.
161
 
     *
162
 
     * Those signals can be used by a GmConf::Presentity to
163
 
     * signal it would like to trigger saving or
164
 
     * removing of the Presentity from the Heap.
165
 
     */
166
 
    void common_add (Presentity &presentity);
167
 
 
168
 
 
169
 
    /** Save the XML Document in the GmConf key.
170
 
     */
171
 
    void save () const;
172
 
 
173
 
 
174
 
    /** This should be triggered when a new Presentity form
175
 
     * built with new_presentity has been submitted.
176
 
     *
177
 
     * It does error checking and adds the Presentity to the
178
 
     * Heap if everything is valid.
179
 
     */
180
 
    void new_presentity_form_submitted (Ekiga::Form &form);
181
 
 
182
 
    /** Triggered when the user decides to rename a group.
183
 
     * @param The group name
184
 
     */
185
 
    void on_rename_group (std::string name);
186
 
 
187
 
    /**
188
 
     */
189
 
    void rename_group_form_submitted (std::string old_name,
190
 
                                      Ekiga::Form& result);
191
 
 
192
 
    Ekiga::ServiceCore &core;
193
 
    Ekiga::PresenceCore *presence_core;
194
 
    xmlDocPtr doc;
195
 
  };
196
 
 
197
 
/**
198
 
 * @}
199
 
 */
200
 
 
201
 
};
202
 
 
203
 
#endif