[ekiga/gnome-2-26] Syntactic sugar for gmref_ptr<Presentity>, gmref_ptr<Heap> and gmref_ptr<Cluster> too
- From: Eugen Dedu <ededu src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga/gnome-2-26] Syntactic sugar for gmref_ptr<Presentity>, gmref_ptr<Heap> and gmref_ptr<Cluster> too
- Date: Mon, 27 Apr 2009 11:59:25 -0400 (EDT)
commit f7f698b06b5ede8ffb1b1818fb477de0be5cc5f6
Author: Julien Puydt <jpuydt src gnome org>
Date: Tue Mar 24 21:08:21 2009 +0000
Syntactic sugar for gmref_ptr<Presentity>, gmref_ptr<Heap> and gmref_ptr<Cluster> too
svn path=/trunk/; revision=7813
---
lib/engine/chat/chat-multiple.h | 2 +-
lib/engine/chat/chat-simple.h | 2 +-
lib/engine/components/avahi/avahi-cluster.cpp | 2 +-
lib/engine/components/avahi/avahi-cluster.h | 4 +-
lib/engine/components/avahi/avahi-heap.h | 2 +
lib/engine/components/echo/echo-presentity.h | 2 +
lib/engine/components/echo/echo-simple.cpp | 2 +-
lib/engine/components/echo/echo-simple.h | 4 +-
.../components/local-roster/local-cluster.cpp | 2 +-
lib/engine/components/local-roster/local-cluster.h | 5 +-
lib/engine/components/local-roster/local-heap.cpp | 6 +-
lib/engine/components/local-roster/local-heap.h | 4 +-
.../components/local-roster/local-presentity.cpp | 4 +-
.../components/local-roster/local-presentity.h | 2 +
.../local-roster/local-roster-bridge.cpp | 6 +-
lib/engine/components/opal/h323-endpoint.cpp | 2 +-
lib/engine/components/opal/h323-endpoint.h | 2 +-
lib/engine/components/opal/sip-chat-simple.cpp | 2 +-
lib/engine/components/opal/sip-chat-simple.h | 4 +-
lib/engine/components/opal/sip-endpoint.cpp | 2 +-
lib/engine/components/opal/sip-endpoint.h | 2 +-
lib/engine/components/resource-list/rl-cluster.cpp | 6 +-
lib/engine/components/resource-list/rl-cluster.h | 2 +-
.../components/resource-list/rl-entry-ref.cpp | 2 +-
lib/engine/components/resource-list/rl-entry.cpp | 2 +-
lib/engine/components/resource-list/rl-heap.cpp | 12 +-
lib/engine/components/resource-list/rl-heap.h | 4 +-
.../components/resource-list/rl-presentity.cpp | 2 +-
lib/engine/gui/gtk-frontend/presentity-view.cpp | 12 +-
lib/engine/gui/gtk-frontend/presentity-view.h | 2 +-
lib/engine/gui/gtk-frontend/roster-view-gtk.cpp | 126 ++++++++++----------
lib/engine/presence/cluster-impl.h | 16 ++--
lib/engine/presence/cluster.h | 16 ++-
lib/engine/presence/heap-impl.h | 4 +-
lib/engine/presence/heap.h | 10 +-
lib/engine/presence/presence-core.cpp | 38 +++---
lib/engine/presence/presence-core.h | 48 ++++----
lib/engine/presence/presentity.h | 1 +
lib/engine/presence/uri-presentity.cpp | 2 +-
39 files changed, 192 insertions(+), 176 deletions(-)
diff --git a/lib/engine/chat/chat-multiple.h b/lib/engine/chat/chat-multiple.h
index c9e829d..17e1993 100644
--- a/lib/engine/chat/chat-multiple.h
+++ b/lib/engine/chat/chat-multiple.h
@@ -57,7 +57,7 @@ namespace Ekiga
/** Returns the Heap associated with the MultipleChat.
* @return The MultipleChat's Heap
*/
- virtual gmref_ptr<Heap> get_heap () const = 0;
+ virtual HeapPtr get_heap () const = 0;
};
};
diff --git a/lib/engine/chat/chat-simple.h b/lib/engine/chat/chat-simple.h
index 76ab811..1621309 100644
--- a/lib/engine/chat/chat-simple.h
+++ b/lib/engine/chat/chat-simple.h
@@ -57,7 +57,7 @@ namespace Ekiga
/** Returns the Presentity associated with the SimpleChat.
* @return The SimpleChat's Presentity.
*/
- virtual gmref_ptr<Presentity> get_presentity () const = 0;
+ virtual PresentityPtr get_presentity () const = 0;
};
};
diff --git a/lib/engine/components/avahi/avahi-cluster.cpp b/lib/engine/components/avahi/avahi-cluster.cpp
index aa10c0a..d52cecb 100644
--- a/lib/engine/components/avahi/avahi-cluster.cpp
+++ b/lib/engine/components/avahi/avahi-cluster.cpp
@@ -39,7 +39,7 @@
Avahi::Cluster::Cluster (Ekiga::ServiceCore &_core): core(_core)
{
- heap = gmref_ptr<Heap>(new Heap (core));
+ heap = HeapPtr(new Heap (core));
add_heap (heap);
diff --git a/lib/engine/components/avahi/avahi-cluster.h b/lib/engine/components/avahi/avahi-cluster.h
index 5cdf4b9..258c713 100644
--- a/lib/engine/components/avahi/avahi-cluster.h
+++ b/lib/engine/components/avahi/avahi-cluster.h
@@ -73,9 +73,11 @@ namespace Avahi
private:
Ekiga::ServiceCore &core;
- gmref_ptr<Heap> heap;
+ HeapPtr heap;
};
+ typedef gmref_ptr<Cluster> ClusterPtr;
+
/**
* @}
*/
diff --git a/lib/engine/components/avahi/avahi-heap.h b/lib/engine/components/avahi/avahi-heap.h
index 84b97f5..bc97dbf 100644
--- a/lib/engine/components/avahi/avahi-heap.h
+++ b/lib/engine/components/avahi/avahi-heap.h
@@ -112,6 +112,8 @@ namespace Avahi
AvahiClient *client;
};
+ typedef gmref_ptr<Heap> HeapPtr;
+
/**
* @}
*/
diff --git a/lib/engine/components/echo/echo-presentity.h b/lib/engine/components/echo/echo-presentity.h
index 8164e78..1ede74e 100644
--- a/lib/engine/components/echo/echo-presentity.h
+++ b/lib/engine/components/echo/echo-presentity.h
@@ -64,6 +64,8 @@ namespace Echo
bool populate_menu (Ekiga::MenuBuilder &);
};
+ typedef gmref_ptr<Presentity> PresentityPtr;
+
};
#endif
diff --git a/lib/engine/components/echo/echo-simple.cpp b/lib/engine/components/echo/echo-simple.cpp
index c4ecdb6..6e3789b 100644
--- a/lib/engine/components/echo/echo-simple.cpp
+++ b/lib/engine/components/echo/echo-simple.cpp
@@ -48,7 +48,7 @@ Echo::SimpleChat::~SimpleChat ()
#endif
}
-gmref_ptr<Ekiga::Presentity>
+Ekiga::PresentityPtr
Echo::SimpleChat::get_presentity () const
{
return presentity;
diff --git a/lib/engine/components/echo/echo-simple.h b/lib/engine/components/echo/echo-simple.h
index 2496e40..8625a5f 100644
--- a/lib/engine/components/echo/echo-simple.h
+++ b/lib/engine/components/echo/echo-simple.h
@@ -57,14 +57,14 @@ namespace Echo
bool send_message (const std::string msg);
- gmref_ptr<Ekiga::Presentity> get_presentity () const;
+ Ekiga::PresentityPtr get_presentity () const;
bool populate_menu (Ekiga::MenuBuilder &builder);
private:
std::list<gmref_ptr<Ekiga::ChatObserver> > observers;
- gmref_ptr<Presentity> presentity;
+ PresentityPtr presentity;
};
};
diff --git a/lib/engine/components/local-roster/local-cluster.cpp b/lib/engine/components/local-roster/local-cluster.cpp
index 1d0b828..4c4fd19 100644
--- a/lib/engine/components/local-roster/local-cluster.cpp
+++ b/lib/engine/components/local-roster/local-cluster.cpp
@@ -44,7 +44,7 @@ Local::Cluster::Cluster (Ekiga::ServiceCore &_core): core(_core)
{
gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
- heap = gmref_ptr<Heap> (new Heap (core));
+ heap = HeapPtr (new Heap (core));
presence_core->presence_received.connect (sigc::mem_fun (this, &Local::Cluster::on_presence_received));
presence_core->status_received.connect (sigc::mem_fun (this, &Local::Cluster::on_status_received));
diff --git a/lib/engine/components/local-roster/local-cluster.h b/lib/engine/components/local-roster/local-cluster.h
index a447f4a..69769f4 100644
--- a/lib/engine/components/local-roster/local-cluster.h
+++ b/lib/engine/components/local-roster/local-cluster.h
@@ -72,13 +72,13 @@ namespace Local
const std::set<std::string> existing_groups () const;
- gmref_ptr<Heap> get_heap ()
+ HeapPtr get_heap ()
{ return heap; }
private:
Ekiga::ServiceCore &core;
- gmref_ptr<Heap> heap;
+ HeapPtr heap;
void on_new_presentity ();
@@ -89,6 +89,7 @@ namespace Local
std::string status);
};
+ typedef gmref_ptr<Cluster> ClusterPtr;
/**
* @}
*/
diff --git a/lib/engine/components/local-roster/local-heap.cpp b/lib/engine/components/local-roster/local-heap.cpp
index f590dfb..4a26e8f 100644
--- a/lib/engine/components/local-roster/local-heap.cpp
+++ b/lib/engine/components/local-roster/local-heap.cpp
@@ -245,7 +245,7 @@ Local::Heap::push_status (const std::string uri,
void
Local::Heap::add (xmlNodePtr node)
{
- gmref_ptr<Presentity> presentity (new Presentity (core, doc, node));
+ PresentityPtr presentity (new Presentity (core, doc, node));
common_add (presentity);
}
@@ -259,7 +259,7 @@ Local::Heap::add (const std::string name,
xmlNodePtr root = NULL;
root = xmlDocGetRootElement (doc.get ());
- gmref_ptr<Presentity> presentity (new Presentity (core, doc, name, uri, groups));
+ PresentityPtr presentity (new Presentity (core, doc, name, uri, groups));
xmlAddChild (root, presentity->get_node ());
@@ -269,7 +269,7 @@ Local::Heap::add (const std::string name,
void
-Local::Heap::common_add (gmref_ptr<Presentity> presentity)
+Local::Heap::common_add (PresentityPtr presentity)
{
gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
diff --git a/lib/engine/components/local-roster/local-heap.h b/lib/engine/components/local-roster/local-heap.h
index e9302d8..e50724d 100644
--- a/lib/engine/components/local-roster/local-heap.h
+++ b/lib/engine/components/local-roster/local-heap.h
@@ -170,7 +170,7 @@ namespace Local
* signal it would like to trigger saving or
* removing of the Presentity from the Heap.
*/
- void common_add (gmref_ptr<Presentity> presentity);
+ void common_add (PresentityPtr presentity);
/** Save the XML Document in the GmConf key.
@@ -202,6 +202,8 @@ namespace Local
std::tr1::shared_ptr<xmlDoc> doc;
};
+ typedef gmref_ptr<Heap> HeapPtr;
+
/**
* @}
*/
diff --git a/lib/engine/components/local-roster/local-presentity.cpp b/lib/engine/components/local-roster/local-presentity.cpp
index 0efcf15..bf2cf3d 100644
--- a/lib/engine/components/local-roster/local-presentity.cpp
+++ b/lib/engine/components/local-roster/local-presentity.cpp
@@ -190,7 +190,7 @@ Local::Presentity::populate_menu (Ekiga::MenuBuilder &builder)
gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
populated
- = presence_core->populate_presentity_menu (gmref_ptr<Presentity>(this),
+ = presence_core->populate_presentity_menu (PresentityPtr(this),
uri, builder);
if (populated)
@@ -215,7 +215,7 @@ Local::Presentity::get_node () const
void
Local::Presentity::edit_presentity ()
{
- gmref_ptr<Cluster> cluster = core.get ("local-cluster");
+ ClusterPtr cluster = core.get ("local-cluster");
Ekiga::FormRequestSimple request(sigc::mem_fun (this, &Local::Presentity::edit_presentity_form_submitted));
std::set<std::string> all_groups = cluster->existing_groups ();
diff --git a/lib/engine/components/local-roster/local-presentity.h b/lib/engine/components/local-roster/local-presentity.h
index 80378c2..9a0ab58 100644
--- a/lib/engine/components/local-roster/local-presentity.h
+++ b/lib/engine/components/local-roster/local-presentity.h
@@ -193,6 +193,8 @@ namespace Local
std::set<std::string> groups;
};
+ typedef gmref_ptr<Presentity> PresentityPtr;
+
/**
* @}
*/
diff --git a/lib/engine/components/local-roster/local-roster-bridge.cpp b/lib/engine/components/local-roster/local-roster-bridge.cpp
index f0dac0c..9accf88 100644
--- a/lib/engine/components/local-roster/local-roster-bridge.cpp
+++ b/lib/engine/components/local-roster/local-roster-bridge.cpp
@@ -53,7 +53,7 @@ namespace Local
{
public:
- ContactDecorator (gmref_ptr<Cluster> _cluster): cluster(_cluster)
+ ContactDecorator (ClusterPtr _cluster): cluster(_cluster)
{}
~ContactDecorator ()
@@ -72,7 +72,7 @@ namespace Local
private:
- gmref_ptr<Cluster> cluster;
+ ClusterPtr cluster;
};
};
@@ -86,7 +86,7 @@ Local::ContactDecorator::populate_menu (Ekiga::ContactPtr contact,
if (cluster->is_supported_uri (uri)) {
- gmref_ptr<Heap> heap(cluster->get_heap ());
+ HeapPtr heap(cluster->get_heap ());
if (!heap->has_presentity_with_uri (uri)) {
diff --git a/lib/engine/components/opal/h323-endpoint.cpp b/lib/engine/components/opal/h323-endpoint.cpp
index 5fa8883..ba46f3b 100644
--- a/lib/engine/components/opal/h323-endpoint.cpp
+++ b/lib/engine/components/opal/h323-endpoint.cpp
@@ -116,7 +116,7 @@ bool Opal::H323::EndPoint::populate_menu (Ekiga::ContactPtr contact,
}
-bool Opal::H323::EndPoint::populate_menu (gmref_ptr<Ekiga::Presentity> presentity,
+bool Opal::H323::EndPoint::populate_menu (Ekiga::PresentityPtr presentity,
const std::string uri,
Ekiga::MenuBuilder& builder)
{
diff --git a/lib/engine/components/opal/h323-endpoint.h b/lib/engine/components/opal/h323-endpoint.h
index b9521b1..994b61c 100644
--- a/lib/engine/components/opal/h323-endpoint.h
+++ b/lib/engine/components/opal/h323-endpoint.h
@@ -74,7 +74,7 @@ namespace Opal {
const std::string uri,
Ekiga::MenuBuilder &builder);
- bool populate_menu (gmref_ptr<Ekiga::Presentity> presentity,
+ bool populate_menu (Ekiga::PresentityPtr presentity,
const std::string uri,
Ekiga::MenuBuilder & builder);
diff --git a/lib/engine/components/opal/sip-chat-simple.cpp b/lib/engine/components/opal/sip-chat-simple.cpp
index 8eebd9c..aa23eff 100644
--- a/lib/engine/components/opal/sip-chat-simple.cpp
+++ b/lib/engine/components/opal/sip-chat-simple.cpp
@@ -112,7 +112,7 @@ SIP::SimpleChat::receive_notice (const std::string msg)
(*iter)->notice (msg);
}
-gmref_ptr<Ekiga::Presentity>
+Ekiga::PresentityPtr
SIP::SimpleChat::get_presentity () const
{
return presentity;
diff --git a/lib/engine/components/opal/sip-chat-simple.h b/lib/engine/components/opal/sip-chat-simple.h
index 8ce84b8..60d005c 100644
--- a/lib/engine/components/opal/sip-chat-simple.h
+++ b/lib/engine/components/opal/sip-chat-simple.h
@@ -67,7 +67,7 @@ namespace SIP
void receive_notice (const std::string msg);
- gmref_ptr<Ekiga::Presentity> get_presentity () const;
+ Ekiga::PresentityPtr get_presentity () const;
bool populate_menu (Ekiga::MenuBuilder& builder);
@@ -76,7 +76,7 @@ namespace SIP
Ekiga::ServiceCore& core;
sigc::slot1<bool, std::string> sender;
std::list<gmref_ptr<Ekiga::ChatObserver> > observers;
- gmref_ptr<Ekiga::Presentity> presentity;
+ Ekiga::PresentityPtr presentity;
std::string uri;
};
};
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index 8816157..68052c6 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -184,7 +184,7 @@ bool Opal::Sip::EndPoint::populate_menu (Ekiga::ContactPtr contact,
}
-bool Opal::Sip::EndPoint::populate_menu (gmref_ptr<Ekiga::Presentity> presentity,
+bool Opal::Sip::EndPoint::populate_menu (Ekiga::PresentityPtr presentity,
const std::string uri,
Ekiga::MenuBuilder& builder)
{
diff --git a/lib/engine/components/opal/sip-endpoint.h b/lib/engine/components/opal/sip-endpoint.h
index b79a6ab..2e4adb4 100644
--- a/lib/engine/components/opal/sip-endpoint.h
+++ b/lib/engine/components/opal/sip-endpoint.h
@@ -90,7 +90,7 @@ namespace Opal {
const std::string uri,
Ekiga::MenuBuilder &builder);
- bool populate_menu (gmref_ptr<Ekiga::Presentity> presentity,
+ bool populate_menu (Ekiga::PresentityPtr presentity,
const std::string uri,
Ekiga::MenuBuilder & builder);
diff --git a/lib/engine/components/resource-list/rl-cluster.cpp b/lib/engine/components/resource-list/rl-cluster.cpp
index 337768f..baebfe1 100644
--- a/lib/engine/components/resource-list/rl-cluster.cpp
+++ b/lib/engine/components/resource-list/rl-cluster.cpp
@@ -108,7 +108,7 @@ RL::Cluster::populate_menu (Ekiga::MenuBuilder& builder)
void
RL::Cluster::add (xmlNodePtr node)
{
- gmref_ptr<Heap> heap (new Heap (core, doc, node));
+ HeapPtr heap (new Heap (core, doc, node));
common_add (heap);
}
@@ -121,7 +121,7 @@ RL::Cluster::add (const std::string uri,
const std::string name,
bool writable)
{
- gmref_ptr<Heap> heap (new Heap (core, doc, name, uri, user, username, password, writable));
+ HeapPtr heap (new Heap (core, doc, name, uri, user, username, password, writable));
xmlNodePtr root = xmlDocGetRootElement (doc.get ());
xmlAddChild (root, heap->get_node ());
@@ -131,7 +131,7 @@ RL::Cluster::add (const std::string uri,
}
void
-RL::Cluster::common_add (gmref_ptr<Heap> heap)
+RL::Cluster::common_add (HeapPtr heap)
{
add_heap (heap);
diff --git a/lib/engine/components/resource-list/rl-cluster.h b/lib/engine/components/resource-list/rl-cluster.h
index f3e3e81..f16b086 100644
--- a/lib/engine/components/resource-list/rl-cluster.h
+++ b/lib/engine/components/resource-list/rl-cluster.h
@@ -74,7 +74,7 @@ namespace RL {
const std::string user,
const std::string name,
bool writable);
- void common_add (gmref_ptr<Heap> heap);
+ void common_add (HeapPtr heap);
void save () const;
void new_heap (const std::string name,
diff --git a/lib/engine/components/resource-list/rl-entry-ref.cpp b/lib/engine/components/resource-list/rl-entry-ref.cpp
index c384812..8cd462f 100644
--- a/lib/engine/components/resource-list/rl-entry-ref.cpp
+++ b/lib/engine/components/resource-list/rl-entry-ref.cpp
@@ -133,7 +133,7 @@ RL::EntryRef::populate_menu (Ekiga::MenuBuilder& builder)
sigc::mem_fun (this, &RL::EntryRef::refresh));
if ( !uri.empty ())
- populated = presence_core->populate_presentity_menu (gmref_ptr<Ekiga::Presentity> (this), uri, builder)
+ populated = presence_core->populate_presentity_menu (Ekiga::PresentityPtr (this), uri, builder)
|| populated;
return populated;
diff --git a/lib/engine/components/resource-list/rl-entry.cpp b/lib/engine/components/resource-list/rl-entry.cpp
index 378b144..00ffed2 100644
--- a/lib/engine/components/resource-list/rl-entry.cpp
+++ b/lib/engine/components/resource-list/rl-entry.cpp
@@ -145,7 +145,7 @@ RL::Entry::populate_menu (Ekiga::MenuBuilder& builder)
sigc::mem_fun (this, &RL::Entry::refresh));
if ( !uri.empty ())
- populated = presence_core->populate_presentity_menu (gmref_ptr<Ekiga::Presentity> (this), uri, builder)
+ populated = presence_core->populate_presentity_menu (Ekiga::PresentityPtr (this), uri, builder)
|| populated;
return populated;
diff --git a/lib/engine/components/resource-list/rl-heap.cpp b/lib/engine/components/resource-list/rl-heap.cpp
index 366292a..8424e94 100644
--- a/lib/engine/components/resource-list/rl-heap.cpp
+++ b/lib/engine/components/resource-list/rl-heap.cpp
@@ -183,11 +183,11 @@ RL::Heap::get_name () const
}
void
-RL::Heap::visit_presentities (sigc::slot1<bool, gmref_ptr<Ekiga::Presentity> > visitor)
+RL::Heap::visit_presentities (sigc::slot1<bool, Ekiga::PresentityPtr > visitor)
{
bool go_on = true;
- for (std::map<gmref_ptr<Presentity>,std::list<sigc::connection> >::iterator
+ for (std::map<PresentityPtr,std::list<sigc::connection> >::iterator
iter = presentities.begin ();
go_on && iter != presentities.end ();
++iter)
@@ -367,7 +367,7 @@ RL::Heap::parse_list (xmlNodePtr list)
&& child->name != NULL
&& xmlStrEqual (BAD_CAST ("entry"), child->name)) {
- gmref_ptr<Presentity> presentity(new Presentity (services, path, doc, child, writable));
+ PresentityPtr presentity(new Presentity (services, path, doc, child, writable));
std::list<sigc::connection> conns;
conns.push_back (presentity->updated.connect (sigc::bind (presentity_updated.make_slot (),presentity)));
conns.push_back (presentity->removed.connect (sigc::bind(presentity_removed.make_slot (),presentity)));
@@ -383,7 +383,7 @@ void
RL::Heap::push_presence (const std::string uri_,
const std::string presence)
{
- for (std::map<gmref_ptr<Presentity>,std::list<sigc::connection> >::iterator
+ for (std::map<PresentityPtr,std::list<sigc::connection> >::iterator
iter = presentities.begin ();
iter != presentities.end ();
++iter) {
@@ -397,7 +397,7 @@ void
RL::Heap::push_status (const std::string uri_,
const std::string status)
{
- for (std::map<gmref_ptr<Presentity>,std::list<sigc::connection> >::iterator
+ for (std::map<PresentityPtr,std::list<sigc::connection> >::iterator
iter = presentities.begin ();
iter != presentities.end ();
++iter) {
@@ -529,7 +529,7 @@ RL::Heap::new_entry ()
"contact on a remote server"));
std::set<std::string> all_groups;
- for (std::map<gmref_ptr<Presentity>,std::list<sigc::connection> >::iterator
+ for (std::map<PresentityPtr,std::list<sigc::connection> >::iterator
iter = presentities.begin ();
iter != presentities.end ();
++iter) {
diff --git a/lib/engine/components/resource-list/rl-heap.h b/lib/engine/components/resource-list/rl-heap.h
index 02fc370..28a5833 100644
--- a/lib/engine/components/resource-list/rl-heap.h
+++ b/lib/engine/components/resource-list/rl-heap.h
@@ -75,7 +75,7 @@ namespace RL {
const std::string get_name () const;
- void visit_presentities (sigc::slot1<bool, gmref_ptr<Ekiga::Presentity> > visitor);
+ void visit_presentities (sigc::slot1<bool, Ekiga::PresentityPtr > visitor);
bool populate_menu (Ekiga::MenuBuilder& builder);
@@ -106,7 +106,7 @@ namespace RL {
std::tr1::shared_ptr<xmlDoc> doc;
xmlNodePtr list_node;
- std::map<gmref_ptr<Presentity>, std::list<sigc::connection> > presentities;
+ std::map<PresentityPtr, std::list<sigc::connection> > presentities;
void refresh ();
diff --git a/lib/engine/components/resource-list/rl-presentity.cpp b/lib/engine/components/resource-list/rl-presentity.cpp
index 46f4255..c673d36 100644
--- a/lib/engine/components/resource-list/rl-presentity.cpp
+++ b/lib/engine/components/resource-list/rl-presentity.cpp
@@ -194,7 +194,7 @@ RL::Presentity::populate_menu (Ekiga::MenuBuilder &builder)
bool populated = false;
gmref_ptr<Ekiga::PresenceCore> presence_core(services.get ("presence-core"));
- populated = presence_core->populate_presentity_menu (gmref_ptr<Presentity> (this), uri, builder);
+ populated = presence_core->populate_presentity_menu (PresentityPtr (this), uri, builder);
if (writable) {
diff --git a/lib/engine/gui/gtk-frontend/presentity-view.cpp b/lib/engine/gui/gtk-frontend/presentity-view.cpp
index a5a799d..c2e6689 100644
--- a/lib/engine/gui/gtk-frontend/presentity-view.cpp
+++ b/lib/engine/gui/gtk-frontend/presentity-view.cpp
@@ -41,7 +41,7 @@ class PresentityViewHelper;
struct _PresentityViewPrivate
{
- gmref_ptr<Ekiga::Presentity> presentity;
+ Ekiga::PresentityPtr presentity;
sigc::connection updated_conn;
sigc::connection removed_conn;
@@ -66,7 +66,7 @@ static void on_presentity_removed (PresentityView* self);
/* declaration of internal api */
static void presentity_view_set_presentity (PresentityView* self,
- gmref_ptr<Ekiga::Presentity> presentity);
+ Ekiga::PresentityPtr presentity);
static void presentity_view_unset_presentity (PresentityView* self);
@@ -105,7 +105,7 @@ on_presentity_removed (PresentityView* self)
static void
presentity_view_set_presentity (PresentityView* self,
- gmref_ptr<Ekiga::Presentity> presentity)
+ Ekiga::PresentityPtr presentity)
{
g_return_if_fail ( !self->priv->presentity);
@@ -121,7 +121,7 @@ presentity_view_unset_presentity (PresentityView* self)
{
if (self->priv->presentity) {
- self->priv->presentity = gmref_ptr<Ekiga::Presentity>(0);
+ self->priv->presentity = Ekiga::PresentityPtr(0);
self->priv->updated_conn.disconnect ();
self->priv->removed_conn.disconnect ();
}
@@ -159,7 +159,7 @@ presentity_view_set_property (GObject* obj,
case PRESENTITY_VIEW_PROP_PRESENTITY:
presentity = (Ekiga::Presentity*)g_value_get_pointer (value);
- presentity_view_set_presentity (self, gmref_ptr<Ekiga::Presentity>(presentity));
+ presentity_view_set_presentity (self, Ekiga::PresentityPtr(presentity));
break;
@@ -249,7 +249,7 @@ presentity_view_get_type ()
/* public api */
GtkWidget*
-presentity_view_new (gmref_ptr<Ekiga::Presentity> presentity)
+presentity_view_new (Ekiga::PresentityPtr presentity)
{
return (GtkWidget*)g_object_new (TYPE_PRESENTITY_VIEW,
"presentity", presentity.get (),
diff --git a/lib/engine/gui/gtk-frontend/presentity-view.h b/lib/engine/gui/gtk-frontend/presentity-view.h
index 06c1781..e0eb8df 100644
--- a/lib/engine/gui/gtk-frontend/presentity-view.h
+++ b/lib/engine/gui/gtk-frontend/presentity-view.h
@@ -62,7 +62,7 @@ struct _PresentityViewClass
/* public api */
-GtkWidget *presentity_view_new (gmref_ptr<Ekiga::Presentity> presentity);
+GtkWidget *presentity_view_new (Ekiga::PresentityPtr presentity);
/* GObject thingies */
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index 6921777..3dbbec3 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -141,20 +141,20 @@ static void remove_child (GtkWidget* child,
/* DESCRIPTION : Set of functions called when the user clicks in a view
* BEHAVIOUR : Folds/unfolds, shows a menu or triggers default action
*/
-static void on_clicked_show_heap_menu (gmref_ptr<Ekiga::Heap> heap,
+static void on_clicked_show_heap_menu (Ekiga::HeapPtr heap,
GdkEventButton* event);
-static void on_clicked_show_heap_group_menu (gmref_ptr<Ekiga::Heap> heap,
+static void on_clicked_show_heap_group_menu (Ekiga::HeapPtr heap,
const std::string name,
GdkEventButton* event);
-static void on_clicked_show_presentity_menu (gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+static void on_clicked_show_presentity_menu (Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
GdkEventButton* event);
static void on_clicked_fold (RosterViewGtk* self,
GtkTreePath* path,
const gchar* name);
-static void on_clicked_trigger_presentity (gmref_ptr<Ekiga::Presentity> presentity);
+static void on_clicked_trigger_presentity (Ekiga::PresentityPtr presentity);
/* DESCRIPTION : Called whenever a (online/total) count has to be updated
* BEHAVIOUR : Updates things...
@@ -239,7 +239,7 @@ static void expand_cell_data_func (GtkTreeViewColumn *column,
* BEHAVIOR : Visits the cluster's heaps, and add them to the view
* PRE : /
*/
-static void on_cluster_added (gmref_ptr<Ekiga::Cluster> cluster,
+static void on_cluster_added (Ekiga::ClusterPtr cluster,
gpointer data);
@@ -247,24 +247,24 @@ static void on_cluster_added (gmref_ptr<Ekiga::Cluster> cluster,
* BEHAVIOR : Adds in the cluster heaps
* PRE : /
*/
-static bool visit_heaps (gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Cluster> cluster,
+static bool visit_heaps (Ekiga::HeapPtr heap,
+ Ekiga::ClusterPtr cluster,
gpointer data);
/* DESCRIPTION : Called when the or heap_added signal has been emitted
* BEHAVIOR : Add or Update the Heap in the GtkTreeView.
* PRE : /
*/
-static void on_heap_added (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
+static void on_heap_added (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
gpointer data);
/* DESCRIPTION : Called when the heap_updated signal has been emitted
* BEHAVIOR : Add or Update the Heap in the GtkTreeView.
* PRE : /
*/
-static void on_heap_updated (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
+static void on_heap_updated (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
gpointer data);
@@ -275,8 +275,8 @@ static void on_heap_updated (gmref_ptr<Ekiga::Cluster> cluster,
* the view.
* PRE : /
*/
-static void on_heap_removed (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
+static void on_heap_removed (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
gpointer data);
@@ -284,9 +284,9 @@ static void on_heap_removed (gmref_ptr<Ekiga::Cluster> cluster,
* BEHAVIOR : Adds in the heap presentities
* PRE : /
*/
-static bool visit_presentities (gmref_ptr<Ekiga::Presentity> presentity,
- gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
+static bool visit_presentities (Ekiga::PresentityPtr presentity,
+ Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
gpointer data);
@@ -296,9 +296,9 @@ static bool visit_presentities (gmref_ptr<Ekiga::Presentity> presentity,
* added.
* PRE : A valid Heap.
*/
-static void on_presentity_added (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+static void on_presentity_added (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
gpointer data);
@@ -307,9 +307,9 @@ static void on_presentity_added (gmref_ptr<Ekiga::Cluster> cluster,
* BEHAVIOR : Update the given Presentity into the Heap.
* PRE : A valid Heap.
*/
-static void on_presentity_updated (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+static void on_presentity_updated (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
gpointer data);
@@ -318,9 +318,9 @@ static void on_presentity_updated (gmref_ptr<Ekiga::Cluster> cluster,
* BEHAVIOR : Remove the given Presentity from the given Heap.
* PRE : A valid Heap.
*/
-static void on_presentity_removed (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+static void on_presentity_removed (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
gpointer data);
@@ -342,7 +342,7 @@ static bool on_handle_questions (Ekiga::FormRequest *request,
* PRE : /
*/
static void roster_view_gtk_find_iter_for_heap (RosterViewGtk *view,
- gmref_ptr<Ekiga::Heap> heap,
+ Ekiga::HeapPtr heap,
GtkTreeIter *iter);
@@ -353,7 +353,7 @@ static void roster_view_gtk_find_iter_for_heap (RosterViewGtk *view,
* PRE : /
*/
static void roster_view_gtk_find_iter_for_group (RosterViewGtk *view,
- gmref_ptr<Ekiga::Heap> heap,
+ Ekiga::HeapPtr heap,
GtkTreeIter *heap_iter,
const std::string name,
GtkTreeIter *iter);
@@ -367,7 +367,7 @@ static void roster_view_gtk_find_iter_for_group (RosterViewGtk *view,
*/
static void roster_view_gtk_find_iter_for_presentity (RosterViewGtk *view,
GtkTreeIter *group_iter,
- gmref_ptr<Ekiga::Presentity> presentity,
+ Ekiga::PresentityPtr presentity,
GtkTreeIter *iter);
@@ -392,7 +392,7 @@ remove_child (GtkWidget* child,
}
static void
-on_clicked_show_heap_menu (gmref_ptr<Ekiga::Heap> heap,
+on_clicked_show_heap_menu (Ekiga::HeapPtr heap,
GdkEventButton* event)
{
MenuBuilderGtk builder;
@@ -410,7 +410,7 @@ on_clicked_show_heap_menu (gmref_ptr<Ekiga::Heap> heap,
}
static void
-on_clicked_show_heap_group_menu (gmref_ptr<Ekiga::Heap> heap,
+on_clicked_show_heap_group_menu (Ekiga::HeapPtr heap,
const std::string name,
GdkEventButton* event)
{
@@ -429,8 +429,8 @@ on_clicked_show_heap_group_menu (gmref_ptr<Ekiga::Heap> heap,
}
static void
-on_clicked_show_presentity_menu (gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+on_clicked_show_presentity_menu (Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
GdkEventButton* event)
{
Ekiga::TemporaryMenuBuilder temp;
@@ -494,7 +494,7 @@ on_clicked_fold (RosterViewGtk* self,
}
static void
-on_clicked_trigger_presentity (gmref_ptr<Ekiga::Presentity> presentity)
+on_clicked_trigger_presentity (Ekiga::PresentityPtr presentity)
{
Ekiga::TriggerMenuBuilder builder;
@@ -699,24 +699,24 @@ on_view_event_after (GtkWidget *tree_view,
if (event->type == GDK_BUTTON_PRESS && event->button == 1 && name)
on_clicked_fold (self, path, name);
if (event->type == GDK_BUTTON_PRESS && event->button == 3)
- on_clicked_show_heap_menu (gmref_ptr<Ekiga::Heap>(heap), event);
+ on_clicked_show_heap_menu (Ekiga::HeapPtr(heap), event);
break;
case TYPE_GROUP:
if (event->type == GDK_BUTTON_PRESS && event->button == 1 && name)
on_clicked_fold (self, path, name);
if (event->type == GDK_BUTTON_PRESS && event->button == 3)
- on_clicked_show_heap_group_menu (gmref_ptr<Ekiga::Heap>(heap),
+ on_clicked_show_heap_group_menu (Ekiga::HeapPtr(heap),
name, event);
break;
case TYPE_PRESENTITY:
if (event->type == GDK_BUTTON_PRESS && event->button == 3)
- on_clicked_show_presentity_menu (gmref_ptr<Ekiga::Heap>(heap),
- gmref_ptr<Ekiga::Presentity>(presentity),
+ on_clicked_show_presentity_menu (Ekiga::HeapPtr(heap),
+ Ekiga::PresentityPtr(presentity),
event);
if (event->type == GDK_2BUTTON_PRESS)
- on_clicked_trigger_presentity (gmref_ptr<Ekiga::Presentity>(presentity));
+ on_clicked_trigger_presentity (Ekiga::PresentityPtr(presentity));
break;
default:
@@ -873,7 +873,7 @@ expand_cell_data_func (GtkTreeViewColumn *column,
}
static void
-on_cluster_added (gmref_ptr<Ekiga::Cluster> cluster,
+on_cluster_added (Ekiga::ClusterPtr cluster,
gpointer data)
{
cluster->visit_heaps (sigc::bind (sigc::ptr_fun (visit_heaps),
@@ -881,8 +881,8 @@ on_cluster_added (gmref_ptr<Ekiga::Cluster> cluster,
}
static bool
-visit_heaps (gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Cluster> cluster,
+visit_heaps (Ekiga::HeapPtr heap,
+ Ekiga::ClusterPtr cluster,
gpointer data)
{
on_heap_updated (cluster, heap, data);
@@ -892,8 +892,8 @@ visit_heaps (gmref_ptr<Ekiga::Heap> heap,
}
static void
-on_heap_added (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
+on_heap_added (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
gpointer data)
{
on_heap_updated (cluster, heap, data);
@@ -901,8 +901,8 @@ on_heap_added (gmref_ptr<Ekiga::Cluster> cluster,
}
static void
-on_heap_updated (gmref_ptr<Ekiga::Cluster> /*cluster*/,
- gmref_ptr<Ekiga::Heap> heap,
+on_heap_updated (Ekiga::ClusterPtr /*cluster*/,
+ Ekiga::HeapPtr heap,
gpointer data)
{
RosterViewGtk *self = ROSTER_VIEW_GTK (data);
@@ -920,8 +920,8 @@ on_heap_updated (gmref_ptr<Ekiga::Cluster> /*cluster*/,
static void
-on_heap_removed (gmref_ptr<Ekiga::Cluster> /*cluster*/,
- gmref_ptr<Ekiga::Heap> heap,
+on_heap_removed (Ekiga::ClusterPtr /*cluster*/,
+ Ekiga::HeapPtr heap,
gpointer data)
{
RosterViewGtk *self = ROSTER_VIEW_GTK (data);
@@ -934,9 +934,9 @@ on_heap_removed (gmref_ptr<Ekiga::Cluster> /*cluster*/,
static bool
-visit_presentities (gmref_ptr<Ekiga::Presentity> presentity,
- gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
+visit_presentities (Ekiga::PresentityPtr presentity,
+ Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
gpointer data)
{
on_presentity_added (cluster, heap, presentity, data);
@@ -945,9 +945,9 @@ visit_presentities (gmref_ptr<Ekiga::Presentity> presentity,
}
static void
-on_presentity_added (gmref_ptr<Ekiga::Cluster> /*cluster*/,
- gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+on_presentity_added (Ekiga::ClusterPtr /*cluster*/,
+ Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
gpointer data)
{
RosterViewGtk *self = ROSTER_VIEW_GTK (data);
@@ -1005,9 +1005,9 @@ on_presentity_added (gmref_ptr<Ekiga::Cluster> /*cluster*/,
static void
-on_presentity_updated (gmref_ptr<Ekiga::Cluster> cluster,
- gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+on_presentity_updated (Ekiga::ClusterPtr cluster,
+ Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
gpointer data)
{
RosterViewGtk *self = (RosterViewGtk *)data;
@@ -1053,9 +1053,9 @@ on_presentity_updated (gmref_ptr<Ekiga::Cluster> cluster,
static void
-on_presentity_removed (gmref_ptr<Ekiga::Cluster> /*cluster*/,
- gmref_ptr<Ekiga::Heap> heap,
- gmref_ptr<Ekiga::Presentity> presentity,
+on_presentity_removed (Ekiga::ClusterPtr /*cluster*/,
+ Ekiga::HeapPtr heap,
+ Ekiga::PresentityPtr presentity,
gpointer data)
{
RosterViewGtk *self = ROSTER_VIEW_GTK (data);
@@ -1097,7 +1097,7 @@ on_handle_questions (Ekiga::FormRequest *request,
*/
static void
roster_view_gtk_find_iter_for_heap (RosterViewGtk *view,
- gmref_ptr<Ekiga::Heap> heap,
+ Ekiga::HeapPtr heap,
GtkTreeIter *iter)
{
GtkTreeModel *model = NULL;
@@ -1123,7 +1123,7 @@ roster_view_gtk_find_iter_for_heap (RosterViewGtk *view,
static void
roster_view_gtk_find_iter_for_group (RosterViewGtk *view,
- gmref_ptr<Ekiga::Heap> heap,
+ Ekiga::HeapPtr heap,
GtkTreeIter *heap_iter,
const std::string name,
GtkTreeIter *iter)
@@ -1161,7 +1161,7 @@ roster_view_gtk_find_iter_for_group (RosterViewGtk *view,
static void
roster_view_gtk_find_iter_for_presentity (RosterViewGtk *view,
GtkTreeIter *group_iter,
- gmref_ptr<Ekiga::Presentity> presentity,
+ Ekiga::PresentityPtr presentity,
GtkTreeIter *iter)
{
GtkTreeModel *model = NULL;
diff --git a/lib/engine/presence/cluster-impl.h b/lib/engine/presence/cluster-impl.h
index c4aeeac..9c36c3a 100644
--- a/lib/engine/presence/cluster-impl.h
+++ b/lib/engine/presence/cluster-impl.h
@@ -80,7 +80,7 @@ namespace Ekiga
virtual ~ClusterImpl ();
- void visit_heaps (sigc::slot1<bool, gmref_ptr<Heap> > visitor);
+ void visit_heaps (sigc::slot1<bool, HeapPtr > visitor);
protected:
@@ -99,11 +99,11 @@ namespace Ekiga
void common_removal_steps (gmref_ptr<HeapType> heap);
- void on_presentity_added (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap);
+ void on_presentity_added (PresentityPtr presentity, gmref_ptr<HeapType> heap);
- void on_presentity_updated (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap);
+ void on_presentity_updated (PresentityPtr presentity, gmref_ptr<HeapType> heap);
- void on_presentity_removed (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap);
+ void on_presentity_removed (PresentityPtr presentity, gmref_ptr<HeapType> heap);
};
/**
@@ -130,7 +130,7 @@ Ekiga::ClusterImpl<HeapType>::~ClusterImpl ()
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::visit_heaps (sigc::slot1<bool, gmref_ptr<Heap> > visitor)
+Ekiga::ClusterImpl<HeapType>::visit_heaps (sigc::slot1<bool, HeapPtr > visitor)
{
RefLister<HeapType>::visit_objects (visitor);
}
@@ -159,21 +159,21 @@ Ekiga::ClusterImpl<HeapType>::remove_heap (gmref_ptr<HeapType> heap)
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::on_presentity_added (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap)
+Ekiga::ClusterImpl<HeapType>::on_presentity_added (PresentityPtr presentity, gmref_ptr<HeapType> heap)
{
presentity_added.emit (heap, presentity);
}
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::on_presentity_updated (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap)
+Ekiga::ClusterImpl<HeapType>::on_presentity_updated (PresentityPtr presentity, gmref_ptr<HeapType> heap)
{
presentity_updated.emit (heap, presentity);
}
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::on_presentity_removed (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap)
+Ekiga::ClusterImpl<HeapType>::on_presentity_removed (PresentityPtr presentity, gmref_ptr<HeapType> heap)
{
presentity_removed.emit (heap, presentity);
}
diff --git a/lib/engine/presence/cluster.h b/lib/engine/presence/cluster.h
index 7417a2d..8911c8e 100644
--- a/lib/engine/presence/cluster.h
+++ b/lib/engine/presence/cluster.h
@@ -59,7 +59,7 @@ namespace Ekiga
/** Get the list of Heaps by visiting them with a callback.
* @param The callback used to know about heaps.
*/
- virtual void visit_heaps (sigc::slot1<bool, gmref_ptr<Heap> >) = 0;
+ virtual void visit_heaps (sigc::slot1<bool, HeapPtr >) = 0;
/** Populates a menu with the actions possible on the Cluster.
* @param The builder to populate.
@@ -70,22 +70,24 @@ namespace Ekiga
* from the Cluster.
* @param The Heap in question.
*/
- sigc::signal1<void, gmref_ptr<Heap> > heap_added;
- sigc::signal1<void, gmref_ptr<Heap> > heap_removed;
+ sigc::signal1<void, HeapPtr > heap_added;
+ sigc::signal1<void, HeapPtr > heap_removed;
/** Those signals are forwarded from the given Heap
* @param The Heap in question.
*/
- sigc::signal1<void, gmref_ptr<Heap> > heap_updated;
- sigc::signal2<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_added;
- sigc::signal2<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_updated;
- sigc::signal2<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_removed;
+ sigc::signal1<void, HeapPtr > heap_updated;
+ sigc::signal2<void, HeapPtr , PresentityPtr > presentity_added;
+ sigc::signal2<void, HeapPtr , PresentityPtr > presentity_updated;
+ sigc::signal2<void, HeapPtr , PresentityPtr > presentity_removed;
/** This chain allows the Cluster to present forms to the user.
*/
ChainOfResponsibility<FormRequest*> questions;
};
+ typedef gmref_ptr<Cluster> ClusterPtr;
+
/**
* @}
*/
diff --git a/lib/engine/presence/heap-impl.h b/lib/engine/presence/heap-impl.h
index f3a622e..0e30f17 100644
--- a/lib/engine/presence/heap-impl.h
+++ b/lib/engine/presence/heap-impl.h
@@ -78,7 +78,7 @@ namespace Ekiga
~HeapImpl ();
- void visit_presentities (sigc::slot1<bool, gmref_ptr<Presentity> > visitor);
+ void visit_presentities (sigc::slot1<bool, PresentityPtr > visitor);
const_iterator begin () const;
@@ -121,7 +121,7 @@ Ekiga::HeapImpl<PresentityType>::~HeapImpl ()
template<typename PresentityType>
void
-Ekiga::HeapImpl<PresentityType>::visit_presentities (sigc::slot1<bool, gmref_ptr<Presentity> > visitor)
+Ekiga::HeapImpl<PresentityType>::visit_presentities (sigc::slot1<bool, PresentityPtr > visitor)
{
RefLister<PresentityType>::visit_objects (visitor);
}
diff --git a/lib/engine/presence/heap.h b/lib/engine/presence/heap.h
index e5ad047..a94833e 100644
--- a/lib/engine/presence/heap.h
+++ b/lib/engine/presence/heap.h
@@ -68,7 +68,7 @@ namespace Ekiga
* @param The callback user to know about presentities (the return value
* means "go on" and allows stopping the visit)
*/
- virtual void visit_presentities (sigc::slot1<bool, gmref_ptr<Presentity> >) = 0;
+ virtual void visit_presentities (sigc::slot1<bool, PresentityPtr >) = 0;
/** Populates a menu with the actions possible on the Heap.
* @param The builder to populate.
@@ -97,21 +97,23 @@ namespace Ekiga
/** This signal is emitted when a Presentity has been added to the Heap.
*/
- sigc::signal1<void, gmref_ptr<Presentity> > presentity_added;
+ sigc::signal1<void, PresentityPtr > presentity_added;
/** This signal is emitted when a Presentity has been updated in the Heap.
*/
- sigc::signal1<void, gmref_ptr<Presentity> > presentity_updated;
+ sigc::signal1<void, PresentityPtr > presentity_updated;
/** This signal is emitted when a Presentity has been removed from the Heap.
*/
- sigc::signal1<void, gmref_ptr<Presentity> > presentity_removed;
+ sigc::signal1<void, PresentityPtr > presentity_removed;
/** This chain allows the Heap to present forms to the user
*/
ChainOfResponsibility<FormRequest*> questions;
};
+ typedef gmref_ptr<Heap> HeapPtr;
+
/**
* @}
*/
diff --git a/lib/engine/presence/presence-core.cpp b/lib/engine/presence/presence-core.cpp
index 34b8c25..6901097 100644
--- a/lib/engine/presence/presence-core.cpp
+++ b/lib/engine/presence/presence-core.cpp
@@ -56,7 +56,7 @@ Ekiga::PresenceCore::~PresenceCore ()
}
void
-Ekiga::PresenceCore::add_cluster (gmref_ptr<Cluster> cluster)
+Ekiga::PresenceCore::add_cluster (ClusterPtr cluster)
{
clusters.insert (cluster);
cluster_added.emit (cluster);
@@ -70,10 +70,10 @@ Ekiga::PresenceCore::add_cluster (gmref_ptr<Cluster> cluster)
}
void
-Ekiga::PresenceCore::visit_clusters (sigc::slot1<bool, gmref_ptr<Cluster> > visitor)
+Ekiga::PresenceCore::visit_clusters (sigc::slot1<bool, ClusterPtr > visitor)
{
bool go_on = true;
- for (std::set<gmref_ptr<Cluster> >::iterator iter = clusters.begin ();
+ for (std::set<ClusterPtr >::iterator iter = clusters.begin ();
iter != clusters.end () && go_on;
iter++)
go_on = visitor (*iter);
@@ -84,7 +84,7 @@ Ekiga::PresenceCore::populate_menu (MenuBuilder &builder)
{
bool populated = false;
- for (std::set<gmref_ptr<Cluster> >::iterator iter = clusters.begin ();
+ for (std::set<ClusterPtr >::iterator iter = clusters.begin ();
iter != clusters.end ();
++iter)
if ((*iter)->populate_menu (builder))
@@ -93,45 +93,45 @@ Ekiga::PresenceCore::populate_menu (MenuBuilder &builder)
return populated;
}
-void Ekiga::PresenceCore::on_heap_added (gmref_ptr<Heap> heap,
- gmref_ptr<Cluster> cluster)
+void Ekiga::PresenceCore::on_heap_added (HeapPtr heap,
+ ClusterPtr cluster)
{
heap_added.emit (cluster, heap);
}
void
-Ekiga::PresenceCore::on_heap_updated (gmref_ptr<Heap> heap,
- gmref_ptr<Cluster> cluster)
+Ekiga::PresenceCore::on_heap_updated (HeapPtr heap,
+ ClusterPtr cluster)
{
heap_updated.emit (cluster, heap);
}
void
-Ekiga::PresenceCore::on_heap_removed (gmref_ptr<Heap> heap, gmref_ptr<Cluster> cluster)
+Ekiga::PresenceCore::on_heap_removed (HeapPtr heap, ClusterPtr cluster)
{
heap_removed.emit (cluster, heap);
}
void
-Ekiga::PresenceCore::on_presentity_added (gmref_ptr<Heap> heap,
- gmref_ptr<Presentity> presentity,
- gmref_ptr<Cluster> cluster)
+Ekiga::PresenceCore::on_presentity_added (HeapPtr heap,
+ PresentityPtr presentity,
+ ClusterPtr cluster)
{
presentity_added.emit (cluster, heap, presentity);
}
void
-Ekiga::PresenceCore::on_presentity_updated (gmref_ptr<Heap> heap,
- gmref_ptr<Presentity> presentity,
- gmref_ptr<Cluster> cluster)
+Ekiga::PresenceCore::on_presentity_updated (HeapPtr heap,
+ PresentityPtr presentity,
+ ClusterPtr cluster)
{
presentity_updated (cluster, heap, presentity);
}
void
-Ekiga::PresenceCore::on_presentity_removed (gmref_ptr<Heap> heap,
- gmref_ptr<Presentity> presentity,
- gmref_ptr<Cluster> cluster)
+Ekiga::PresenceCore::on_presentity_removed (HeapPtr heap,
+ PresentityPtr presentity,
+ ClusterPtr cluster)
{
presentity_removed.emit (cluster, heap, presentity);
}
@@ -143,7 +143,7 @@ Ekiga::PresenceCore::add_presentity_decorator (gmref_ptr<PresentityDecorator> de
}
bool
-Ekiga::PresenceCore::populate_presentity_menu (gmref_ptr<Presentity> presentity,
+Ekiga::PresenceCore::populate_presentity_menu (PresentityPtr presentity,
const std::string uri,
MenuBuilder &builder)
{
diff --git a/lib/engine/presence/presence-core.h b/lib/engine/presence/presence-core.h
index 6a8d21c..4d311b3 100644
--- a/lib/engine/presence/presence-core.h
+++ b/lib/engine/presence/presence-core.h
@@ -65,7 +65,7 @@ namespace Ekiga
* @param The uri for which actions could be made available.
* @param A MenuBuilder object to populate.
*/
- virtual bool populate_menu (gmref_ptr<Presentity> /*presentity*/,
+ virtual bool populate_menu (PresentityPtr /*presentity*/,
const std::string /*uri*/,
MenuBuilder &/*builder*/) = 0;
};
@@ -168,50 +168,50 @@ namespace Ekiga
/** Adds a cluster to the PresenceCore service.
* @param The cluster to be added.
*/
- void add_cluster (gmref_ptr<Cluster> cluster);
+ void add_cluster (ClusterPtr cluster);
/** Triggers a callback for all Ekiga::Cluster clusters of the
* PresenceCore service.
* @param The callback (the return value means "go on" and allows
* stopping the visit)
*/
- void visit_clusters (sigc::slot1<bool, gmref_ptr<Cluster> > visitor);
+ void visit_clusters (sigc::slot1<bool, ClusterPtr > visitor);
/** This signal is emitted when an Ekiga::Cluster has been added
* to the PresenceCore Service.
*/
- sigc::signal1<void, gmref_ptr<Cluster> > cluster_added;
+ sigc::signal1<void, ClusterPtr > cluster_added;
/** Those signals are forwarding the heap_added, heap_updated
* and heap_removed from the given Cluster.
*
*/
- sigc::signal2<void, gmref_ptr<Cluster> , gmref_ptr<Heap> > heap_added;
- sigc::signal2<void, gmref_ptr<Cluster> , gmref_ptr<Heap> > heap_updated;
- sigc::signal2<void, gmref_ptr<Cluster> , gmref_ptr<Heap> > heap_removed;
+ sigc::signal2<void, ClusterPtr , HeapPtr > heap_added;
+ sigc::signal2<void, ClusterPtr , HeapPtr > heap_updated;
+ sigc::signal2<void, ClusterPtr , HeapPtr > heap_removed;
/** Those signals are forwarding the presentity_added, presentity_updated
* and presentity_removed from the given Heap of the given Cluster.
*/
- sigc::signal3<void, gmref_ptr<Cluster> , gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_added;
- sigc::signal3<void, gmref_ptr<Cluster> , gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_updated;
- sigc::signal3<void, gmref_ptr<Cluster> , gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_removed;
+ sigc::signal3<void, ClusterPtr , HeapPtr , PresentityPtr > presentity_added;
+ sigc::signal3<void, ClusterPtr , HeapPtr , PresentityPtr > presentity_updated;
+ sigc::signal3<void, ClusterPtr , HeapPtr , PresentityPtr > presentity_removed;
private:
- std::set<gmref_ptr<Cluster> > clusters;
- void on_heap_added (gmref_ptr<Heap> heap, gmref_ptr<Cluster> cluster);
- void on_heap_updated (gmref_ptr<Heap> heap, gmref_ptr<Cluster> cluster);
- void on_heap_removed (gmref_ptr<Heap> heap, gmref_ptr<Cluster> cluster);
- void on_presentity_added (gmref_ptr<Heap> heap,
- gmref_ptr<Presentity> presentity,
- gmref_ptr<Cluster> cluster);
- void on_presentity_updated (gmref_ptr<Heap> heap,
- gmref_ptr<Presentity> presentity,
- gmref_ptr<Cluster> cluster);
- void on_presentity_removed (gmref_ptr<Heap> heap,
- gmref_ptr<Presentity> presentity,
- gmref_ptr<Cluster> cluster);
+ std::set<ClusterPtr > clusters;
+ void on_heap_added (HeapPtr heap, ClusterPtr cluster);
+ void on_heap_updated (HeapPtr heap, ClusterPtr cluster);
+ void on_heap_removed (HeapPtr heap, ClusterPtr cluster);
+ void on_presentity_added (HeapPtr heap,
+ PresentityPtr presentity,
+ ClusterPtr cluster);
+ void on_presentity_updated (HeapPtr heap,
+ PresentityPtr presentity,
+ ClusterPtr cluster);
+ void on_presentity_removed (HeapPtr heap,
+ PresentityPtr presentity,
+ ClusterPtr cluster);
/*** API to act on presentities ***/
public:
@@ -225,7 +225,7 @@ namespace Ekiga
* @param The uri for which the decoration is needed.
* @param The builder to populate.
*/
- bool populate_presentity_menu (gmref_ptr<Presentity> presentity,
+ bool populate_presentity_menu (PresentityPtr presentity,
const std::string uri,
MenuBuilder &builder);
diff --git a/lib/engine/presence/presentity.h b/lib/engine/presence/presentity.h
index 500cb85..29dd813 100644
--- a/lib/engine/presence/presentity.h
+++ b/lib/engine/presence/presentity.h
@@ -105,6 +105,7 @@ namespace Ekiga
ChainOfResponsibility<FormRequest*> questions;
};
+ typedef gmref_ptr<Presentity> PresentityPtr;
/**
* @}
*/
diff --git a/lib/engine/presence/uri-presentity.cpp b/lib/engine/presence/uri-presentity.cpp
index 784223d..ddaf972 100644
--- a/lib/engine/presence/uri-presentity.cpp
+++ b/lib/engine/presence/uri-presentity.cpp
@@ -93,7 +93,7 @@ bool
Ekiga::URIPresentity::populate_menu (Ekiga::MenuBuilder &builder)
{
gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
- return presence_core->populate_presentity_menu (gmref_ptr<Presentity>(this),
+ return presence_core->populate_presentity_menu (PresentityPtr(this),
uri, builder);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]