3
* Ekiga -- A VoIP and Video-Conferencing application
4
* Copyright (C) 2000-2009 Damien Sandras <dsandras@seconix.com>
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.
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.
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.
28
* cluster.h - description
29
* ------------------------------------------
30
* begin : written in 2007 by Julien Puydt
31
* copyright : (c) 2007 by Julien Puydt
32
* description : declaration of the interface of a heap
33
* implementation backend
46
* @addtogroup presence
50
class Cluster: public virtual GmRefCounted
57
virtual ~Cluster () {}
59
/** Get the list of Heaps by visiting them with a callback.
60
* @param The callback used to know about heaps.
62
virtual void visit_heaps (sigc::slot1<bool, gmref_ptr<Heap> >) = 0;
64
/** Populates a menu with the actions possible on the Cluster.
65
* @param The builder to populate.
67
virtual bool populate_menu (MenuBuilder &) = 0;
69
/** Those signals are emitted whenever a new Heap is added or removed
71
* @param The Heap in question.
73
sigc::signal1<void, gmref_ptr<Heap> > heap_added;
74
sigc::signal1<void, gmref_ptr<Heap> > heap_removed;
76
/** Those signals are forwarded from the given Heap
77
* @param The Heap in question.
79
sigc::signal1<void, gmref_ptr<Heap> > heap_updated;
80
sigc::signal2<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_added;
81
sigc::signal2<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_updated;
82
sigc::signal2<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_removed;
84
/** This chain allows the Cluster to present forms to the user.
86
ChainOfResponsibility<FormRequest*> questions;