ekiga r7321 - trunk/lib/engine/presence/skel
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7321 - trunk/lib/engine/presence/skel
- Date: Mon, 10 Nov 2008 21:35:48 +0000 (UTC)
Author: jpuydt
Date: Mon Nov 10 21:35:48 2008
New Revision: 7321
URL: http://svn.gnome.org/viewvc/ekiga?rev=7321&view=rev
Log:
Made the presence stack skel use gmref_ptr
Modified:
trunk/lib/engine/presence/skel/cluster-impl.h
trunk/lib/engine/presence/skel/cluster.h
trunk/lib/engine/presence/skel/heap-impl.h
trunk/lib/engine/presence/skel/heap.h
trunk/lib/engine/presence/skel/presence-core.cpp
trunk/lib/engine/presence/skel/presence-core.h
trunk/lib/engine/presence/skel/presentity.h
trunk/lib/engine/presence/skel/uri-presentity.cpp
Modified: trunk/lib/engine/presence/skel/cluster-impl.h
==============================================================================
--- trunk/lib/engine/presence/skel/cluster-impl.h (original)
+++ trunk/lib/engine/presence/skel/cluster-impl.h Mon Nov 10 21:35:48 2008
@@ -38,7 +38,7 @@
#include <vector>
-#include "lister.h"
+#include "reflister.h"
#include "cluster.h"
namespace Ekiga
@@ -69,35 +69,35 @@
class ClusterImpl:
public Cluster,
public sigc::trackable,
- protected Lister<HeapType>
+ protected RefLister<HeapType>
{
public:
- typedef typename Lister<HeapType>::iterator iterator;
- typedef typename Lister<HeapType>::const_iterator const_iterator;
+ //typedef typename Lister<HeapType>::iterator iterator;
+ //typedef typename Lister<HeapType>::const_iterator const_iterator;
ClusterImpl ();
virtual ~ClusterImpl ();
- void visit_heaps (sigc::slot<bool, Heap &> visitor);
+ void visit_heaps (sigc::slot<bool, gmref_ptr<Heap> > visitor);
protected:
- void add_heap (HeapType &heap);
+ void add_heap (gmref_ptr<HeapType> heap);
- void remove_heap (HeapType &heap);
+ void remove_heap (gmref_ptr<HeapType> heap);
private:
- void common_removal_steps (HeapType &heap);
+ void common_removal_steps (gmref_ptr<HeapType> heap);
- void on_presentity_added (Presentity &presentity, HeapType *heap);
+ void on_presentity_added (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap);
- void on_presentity_updated (Presentity &presentity, HeapType *heap);
+ void on_presentity_updated (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap);
- void on_presentity_removed (Presentity &presentity, HeapType *heap);
+ void on_presentity_removed (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap);
};
/**
@@ -112,9 +112,9 @@
Ekiga::ClusterImpl<HeapType>::ClusterImpl ()
{
/* signal forwarding */
- Lister<HeapType>::object_added.connect (heap_added.make_slot ());
- Lister<HeapType>::object_removed.connect (heap_removed.make_slot ());
- Lister<HeapType>::object_updated.connect (heap_updated.make_slot ());
+ RefLister<HeapType>::object_added.connect (heap_added.make_slot ());
+ RefLister<HeapType>::object_removed.connect (heap_removed.make_slot ());
+ RefLister<HeapType>::object_updated.connect (heap_updated.make_slot ());
}
template<typename HeapType>
@@ -124,52 +124,52 @@
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::visit_heaps (sigc::slot<bool, Heap &> visitor)
+Ekiga::ClusterImpl<HeapType>::visit_heaps (sigc::slot<bool, gmref_ptr<Heap> > visitor)
{
- Lister<HeapType>::visit_objects (visitor);
+ RefLister<HeapType>::visit_objects (visitor);
}
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::add_heap (HeapType &heap)
+Ekiga::ClusterImpl<HeapType>::add_heap (gmref_ptr<HeapType> heap)
{
- heap.presentity_added.connect (sigc::bind (sigc::mem_fun (this, &ClusterImpl::on_presentity_added), &heap));
+ heap->presentity_added.connect (sigc::bind (sigc::mem_fun (this, &ClusterImpl::on_presentity_added), heap));
- heap.presentity_updated.connect (sigc::bind (sigc::mem_fun (this, &ClusterImpl::on_presentity_updated), &heap));
+ heap->presentity_updated.connect (sigc::bind (sigc::mem_fun (this, &ClusterImpl::on_presentity_updated), heap));
- heap.presentity_removed.connect (sigc::bind (sigc::mem_fun (this, &ClusterImpl::on_presentity_removed), &heap));
+ heap->presentity_removed.connect (sigc::bind (sigc::mem_fun (this, &ClusterImpl::on_presentity_removed), heap));
- heap.questions.add_handler (questions.make_slot ());
+ heap->questions.add_handler (questions.make_slot ());
add_object (heap);
}
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::remove_heap (HeapType &heap)
+Ekiga::ClusterImpl<HeapType>::remove_heap (gmref_ptr<HeapType> heap)
{
remove_object (heap);
}
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::on_presentity_added (Presentity &presentity, HeapType *heap)
+Ekiga::ClusterImpl<HeapType>::on_presentity_added (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap)
{
- presentity_added.emit (*heap, presentity);
+ presentity_added.emit (heap, presentity);
}
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::on_presentity_updated (Presentity &presentity, HeapType *heap)
+Ekiga::ClusterImpl<HeapType>::on_presentity_updated (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap)
{
- presentity_updated.emit (*heap, presentity);
+ presentity_updated.emit (heap, presentity);
}
template<typename HeapType>
void
-Ekiga::ClusterImpl<HeapType>::on_presentity_removed (Presentity &presentity, HeapType *heap)
+Ekiga::ClusterImpl<HeapType>::on_presentity_removed (gmref_ptr<Presentity> presentity, gmref_ptr<HeapType> heap)
{
- presentity_removed.emit (*heap, presentity);
+ presentity_removed.emit (heap, presentity);
}
#endif
Modified: trunk/lib/engine/presence/skel/cluster.h
==============================================================================
--- trunk/lib/engine/presence/skel/cluster.h (original)
+++ trunk/lib/engine/presence/skel/cluster.h Mon Nov 10 21:35:48 2008
@@ -47,7 +47,7 @@
* @{
*/
- class Cluster
+ class Cluster: public virtual GmRefCounted
{
public:
@@ -59,7 +59,7 @@
/** Get the list of Heaps by visiting them with a callback.
* @param The callback used to know about heaps.
*/
- virtual void visit_heaps (sigc::slot<bool, Heap &>) = 0;
+ virtual void visit_heaps (sigc::slot<bool, gmref_ptr<Heap> >) = 0;
/** Populates a menu with the actions possible on the Cluster.
* @param The builder to populate.
@@ -70,16 +70,16 @@
* from the Cluster.
* @param The Heap in question.
*/
- sigc::signal<void, Heap &> heap_added;
- sigc::signal<void, Heap &> heap_removed;
+ sigc::signal<void, gmref_ptr<Heap> > heap_added;
+ sigc::signal<void, gmref_ptr<Heap> > heap_removed;
/** Those signals are forwarded from the given Heap
* @param The Heap in question.
*/
- sigc::signal<void, Heap &> heap_updated;
- sigc::signal<void, Heap &, Presentity &> presentity_added;
- sigc::signal<void, Heap &, Presentity &> presentity_updated;
- sigc::signal<void, Heap &, Presentity &> presentity_removed;
+ sigc::signal<void, gmref_ptr<Heap> > heap_updated;
+ sigc::signal<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_added;
+ sigc::signal<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_updated;
+ sigc::signal<void, gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_removed;
/** This chain allows the Cluster to present forms to the user.
*/
Modified: trunk/lib/engine/presence/skel/heap-impl.h
==============================================================================
--- trunk/lib/engine/presence/skel/heap-impl.h (original)
+++ trunk/lib/engine/presence/skel/heap-impl.h Mon Nov 10 21:35:48 2008
@@ -37,7 +37,7 @@
#ifndef __HEAP_IMPL_H__
#define __HEAP_IMPL_H__
-#include "lister.h"
+#include "reflister.h"
#include "heap.h"
namespace Ekiga
@@ -67,33 +67,33 @@
class HeapImpl:
public Heap,
public sigc::trackable,
- protected Lister<PresentityType>
+ protected RefLister<PresentityType>
{
public:
- typedef typename Lister<PresentityType>::iterator iterator;
- typedef typename Lister<PresentityType>::const_iterator const_iterator;
+ //typedef typename Lister<PresentityType>::iterator iterator;
+ //typedef typename Lister<PresentityType>::const_iterator const_iterator;
HeapImpl ();
~HeapImpl ();
- void visit_presentities (sigc::slot<bool, Presentity &> visitor);
+ void visit_presentities (sigc::slot<bool, gmref_ptr<Presentity> > visitor);
- const_iterator begin () const;
+ //const_iterator begin () const;
- iterator begin ();
+ //iterator begin ();
- const_iterator end () const;
+ //const_iterator end () const;
- iterator end ();
+ //iterator end ();
protected:
- void add_presentity (PresentityType &presentity);
+ void add_presentity (gmref_ptr<PresentityType> presentity);
- void remove_presentity (PresentityType &presentity);
+ void remove_presentity (gmref_ptr<PresentityType> presentity);
};
/**
@@ -107,9 +107,9 @@
Ekiga::HeapImpl<PresentityType>::HeapImpl ()
{
/* this is signal forwarding */
- Lister<PresentityType>::object_added.connect (presentity_added.make_slot ());
- Lister<PresentityType>::object_removed.connect (presentity_removed.make_slot ());
- Lister<PresentityType>::object_updated.connect (presentity_updated.make_slot ());
+ RefLister<PresentityType>::object_added.connect (presentity_added.make_slot ());
+ RefLister<PresentityType>::object_removed.connect (presentity_removed.make_slot ());
+ RefLister<PresentityType>::object_updated.connect (presentity_updated.make_slot ());
}
@@ -120,51 +120,51 @@
template<typename PresentityType>
void
-Ekiga::HeapImpl<PresentityType>::visit_presentities (sigc::slot<bool, Presentity &> visitor)
+Ekiga::HeapImpl<PresentityType>::visit_presentities (sigc::slot<bool, gmref_ptr<Presentity> > visitor)
{
- Lister<PresentityType>::visit_objects (visitor);
+ RefLister<PresentityType>::visit_objects (visitor);
}
-template<typename PresentityType>
-typename Ekiga::HeapImpl<PresentityType>::iterator
-Ekiga::HeapImpl<PresentityType>::begin ()
-{
- return Lister<PresentityType>::begin ();
-}
-
-template<typename PresentityType>
-typename Ekiga::HeapImpl<PresentityType>::iterator
-Ekiga::HeapImpl<PresentityType>::end ()
-{
- return Lister<PresentityType>::end ();
-}
-
-template<typename PresentityType>
-typename Ekiga::HeapImpl<PresentityType>::const_iterator
-Ekiga::HeapImpl<PresentityType>::begin () const
-{
- return Lister<PresentityType>::begin ();
-}
-
-template<typename PresentityType>
-typename Ekiga::HeapImpl<PresentityType>::const_iterator
-Ekiga::HeapImpl<PresentityType>::end () const
-{
- return Lister<PresentityType>::end ();
-}
+// template<typename PresentityType>
+// typename Ekiga::HeapImpl<PresentityType>::iterator
+// Ekiga::HeapImpl<PresentityType>::begin ()
+// {
+// return Lister<PresentityType>::begin ();
+// }
+
+// template<typename PresentityType>
+// typename Ekiga::HeapImpl<PresentityType>::iterator
+// Ekiga::HeapImpl<PresentityType>::end ()
+// {
+// return Lister<PresentityType>::end ();
+// }
+
+// template<typename PresentityType>
+// typename Ekiga::HeapImpl<PresentityType>::const_iterator
+// Ekiga::HeapImpl<PresentityType>::begin () const
+// {
+// return Lister<PresentityType>::begin ();
+// }
+
+// template<typename PresentityType>
+// typename Ekiga::HeapImpl<PresentityType>::const_iterator
+// Ekiga::HeapImpl<PresentityType>::end () const
+// {
+// return Lister<PresentityType>::end ();
+// }
template<typename PresentityType>
void
-Ekiga::HeapImpl<PresentityType>::add_presentity (PresentityType &presentity)
+Ekiga::HeapImpl<PresentityType>::add_presentity (gmref_ptr<PresentityType> presentity)
{
- presentity.questions.add_handler (questions.make_slot ());
+ presentity->questions.add_handler (questions.make_slot ());
add_object (presentity);
}
template<typename PresentityType>
void
-Ekiga::HeapImpl<PresentityType>::remove_presentity (PresentityType &presentity)
+Ekiga::HeapImpl<PresentityType>::remove_presentity (gmref_ptr<PresentityType> presentity)
{
remove_object (presentity);
}
Modified: trunk/lib/engine/presence/skel/heap.h
==============================================================================
--- trunk/lib/engine/presence/skel/heap.h (original)
+++ trunk/lib/engine/presence/skel/heap.h Mon Nov 10 21:35:48 2008
@@ -38,6 +38,8 @@
#ifndef __HEAP_H__
#define __HEAP_H__
+#include "gmref.h"
+
#include "presentity.h"
namespace Ekiga
@@ -48,7 +50,7 @@
* @{
*/
- class Heap
+ class Heap: public virtual GmRefCounted
{
public:
@@ -66,7 +68,7 @@
* @param The callback user to know about presentities (the return value
* means "go on" and allows stopping the visit)
*/
- virtual void visit_presentities (sigc::slot<bool, Presentity &>) = 0;
+ virtual void visit_presentities (sigc::slot<bool, gmref_ptr<Presentity> >) = 0;
/** Populates a menu with the actions possible on the Heap.
* @param The builder to populate.
@@ -95,15 +97,15 @@
/** This signal is emitted when a Presentity has been added to the Heap.
*/
- sigc::signal<void, Presentity &> presentity_added;
+ sigc::signal<void, gmref_ptr<Presentity> > presentity_added;
/** This signal is emitted when a Presentity has been updated in the Heap.
*/
- sigc::signal<void, Presentity &> presentity_updated;
+ sigc::signal<void, gmref_ptr<Presentity> > presentity_updated;
/** This signal is emitted when a Presentity has been removed from the Heap.
*/
- sigc::signal<void, Presentity &> presentity_removed;
+ sigc::signal<void, gmref_ptr<Presentity> > presentity_removed;
/** This chain allows the Heap to present forms to the user
*/
Modified: trunk/lib/engine/presence/skel/presence-core.cpp
==============================================================================
--- trunk/lib/engine/presence/skel/presence-core.cpp (original)
+++ trunk/lib/engine/presence/skel/presence-core.cpp Mon Nov 10 21:35:48 2008
@@ -56,27 +56,27 @@
}
void
-Ekiga::PresenceCore::add_cluster (Cluster &cluster)
+Ekiga::PresenceCore::add_cluster (gmref_ptr<Cluster> cluster)
{
- clusters.insert (&cluster);
+ clusters.insert (cluster);
cluster_added.emit (cluster);
- cluster.heap_added.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_heap_added), &cluster));
- cluster.heap_updated.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_heap_updated), &cluster));
- cluster.heap_removed.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_heap_removed), &cluster));
- cluster.presentity_added.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_presentity_added), &cluster));
- cluster.presentity_updated.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_presentity_updated), &cluster));
- cluster.presentity_removed.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_presentity_removed), &cluster));
- cluster.questions.add_handler (questions.make_slot ());
+ cluster->heap_added.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_heap_added), cluster));
+ cluster->heap_updated.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_heap_updated), cluster));
+ cluster->heap_removed.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_heap_removed), cluster));
+ cluster->presentity_added.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_presentity_added), cluster));
+ cluster->presentity_updated.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_presentity_updated), cluster));
+ cluster->presentity_removed.connect (sigc::bind (sigc::mem_fun (this, &Ekiga::PresenceCore::on_presentity_removed), cluster));
+ cluster->questions.add_handler (questions.make_slot ());
}
void
-Ekiga::PresenceCore::visit_clusters (sigc::slot<bool, Cluster &> visitor)
+Ekiga::PresenceCore::visit_clusters (sigc::slot<bool, gmref_ptr<Cluster> > visitor)
{
bool go_on = true;
- for (std::set<Cluster *>::iterator iter = clusters.begin ();
+ for (std::set<gmref_ptr<Cluster> >::iterator iter = clusters.begin ();
iter != clusters.end () && go_on;
iter++)
- go_on = visitor (*(*iter));
+ go_on = visitor (*iter);
}
bool
@@ -84,7 +84,7 @@
{
bool populated = false;
- for (std::set<Cluster*>::iterator iter = clusters.begin ();
+ for (std::set<gmref_ptr<Cluster> >::iterator iter = clusters.begin ();
iter != clusters.end ();
++iter)
if ((*iter)->populate_menu (builder))
@@ -93,47 +93,47 @@
return populated;
}
-void Ekiga::PresenceCore::on_heap_added (Heap &heap,
- Cluster *cluster)
+void Ekiga::PresenceCore::on_heap_added (gmref_ptr<Heap> heap,
+ gmref_ptr<Cluster> cluster)
{
- heap_added.emit (*cluster, heap);
+ heap_added.emit (cluster, heap);
}
void
-Ekiga::PresenceCore::on_heap_updated (Heap &heap,
- Cluster *cluster)
+Ekiga::PresenceCore::on_heap_updated (gmref_ptr<Heap> heap,
+ gmref_ptr<Cluster> cluster)
{
- heap_updated.emit (*cluster, heap);
+ heap_updated.emit (cluster, heap);
}
void
-Ekiga::PresenceCore::on_heap_removed (Heap &heap, Cluster *cluster)
+Ekiga::PresenceCore::on_heap_removed (gmref_ptr<Heap> heap, gmref_ptr<Cluster> cluster)
{
- heap_removed.emit (*cluster, heap);
+ heap_removed.emit (cluster, heap);
}
void
-Ekiga::PresenceCore::on_presentity_added (Heap &heap,
- Presentity &presentity,
- Cluster *cluster)
+Ekiga::PresenceCore::on_presentity_added (gmref_ptr<Heap> heap,
+ gmref_ptr<Presentity> presentity,
+ gmref_ptr<Cluster> cluster)
{
- presentity_added.emit (*cluster, heap, presentity);
+ presentity_added.emit (cluster, heap, presentity);
}
void
-Ekiga::PresenceCore::on_presentity_updated (Heap &heap,
- Presentity &presentity,
- Cluster *cluster)
+Ekiga::PresenceCore::on_presentity_updated (gmref_ptr<Heap> heap,
+ gmref_ptr<Presentity> presentity,
+ gmref_ptr<Cluster> cluster)
{
- presentity_updated (*cluster, heap, presentity);
+ presentity_updated (cluster, heap, presentity);
}
void
-Ekiga::PresenceCore::on_presentity_removed (Heap &heap,
- Presentity &presentity,
- Cluster *cluster)
+Ekiga::PresenceCore::on_presentity_removed (gmref_ptr<Heap> heap,
+ gmref_ptr<Presentity> presentity,
+ gmref_ptr<Cluster> cluster)
{
- presentity_removed.emit (*cluster, heap, presentity);
+ presentity_removed.emit (cluster, heap, presentity);
}
void
@@ -143,7 +143,7 @@
}
bool
-Ekiga::PresenceCore::populate_presentity_menu (Presentity& presentity,
+Ekiga::PresenceCore::populate_presentity_menu (gmref_ptr<Presentity> presentity,
const std::string uri,
MenuBuilder &builder)
{
Modified: trunk/lib/engine/presence/skel/presence-core.h
==============================================================================
--- trunk/lib/engine/presence/skel/presence-core.h (original)
+++ trunk/lib/engine/presence/skel/presence-core.h Mon Nov 10 21:35:48 2008
@@ -65,7 +65,7 @@
* @param The uri for which actions could be made available.
* @param A MenuBuilder object to populate.
*/
- virtual bool populate_menu (Presentity& /*presentity*/,
+ virtual bool populate_menu (gmref_ptr<Presentity> /*presentity*/,
const std::string /*uri*/,
MenuBuilder &/*builder*/) = 0;
};
@@ -168,50 +168,50 @@
/** Adds a cluster to the PresenceCore service.
* @param The cluster to be added.
*/
- void add_cluster (Cluster &cluster);
+ void add_cluster (gmref_ptr<Cluster> 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::slot<bool, Cluster &> visitor);
+ void visit_clusters (sigc::slot<bool, gmref_ptr<Cluster> > visitor);
/** This signal is emitted when an Ekiga::Cluster has been added
* to the PresenceCore Service.
*/
- sigc::signal<void, Cluster &> cluster_added;
+ sigc::signal<void, gmref_ptr<Cluster> > cluster_added;
/** Those signals are forwarding the heap_added, heap_updated
* and heap_removed from the given Cluster.
*
*/
- sigc::signal<void, Cluster &, Heap &> heap_added;
- sigc::signal<void, Cluster &, Heap &> heap_updated;
- sigc::signal<void, Cluster &, Heap &> heap_removed;
+ sigc::signal<void, gmref_ptr<Cluster> , gmref_ptr<Heap> > heap_added;
+ sigc::signal<void, gmref_ptr<Cluster> , gmref_ptr<Heap> > heap_updated;
+ sigc::signal<void, gmref_ptr<Cluster> , gmref_ptr<Heap> > heap_removed;
/** Those signals are forwarding the presentity_added, presentity_updated
* and presentity_removed from the given Heap of the given Cluster.
*/
- sigc::signal<void, Cluster &, Heap &, Presentity &> presentity_added;
- sigc::signal<void, Cluster &, Heap &, Presentity &> presentity_updated;
- sigc::signal<void, Cluster &, Heap &, Presentity &> presentity_removed;
+ sigc::signal<void, gmref_ptr<Cluster> , gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_added;
+ sigc::signal<void, gmref_ptr<Cluster> , gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_updated;
+ sigc::signal<void, gmref_ptr<Cluster> , gmref_ptr<Heap> , gmref_ptr<Presentity> > presentity_removed;
private:
- std::set<Cluster *> clusters;
- void on_heap_added (Heap &heap, Cluster *cluster);
- void on_heap_updated (Heap &heap, Cluster *cluster);
- void on_heap_removed (Heap &heap, Cluster *cluster);
- void on_presentity_added (Heap &heap,
- Presentity &presentity,
- Cluster *cluster);
- void on_presentity_updated (Heap &heap,
- Presentity &presentity,
- Cluster *cluster);
- void on_presentity_removed (Heap &heap,
- Presentity &presentity,
- Cluster *cluster);
+ 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);
/*** API to act on presentities ***/
public:
@@ -225,7 +225,7 @@
* @param The uri for which the decoration is needed.
* @param The builder to populate.
*/
- bool populate_presentity_menu (Presentity& presentity,
+ bool populate_presentity_menu (gmref_ptr<Presentity> presentity,
const std::string uri,
MenuBuilder &builder);
Modified: trunk/lib/engine/presence/skel/presentity.h
==============================================================================
--- trunk/lib/engine/presence/skel/presentity.h (original)
+++ trunk/lib/engine/presence/skel/presentity.h Mon Nov 10 21:35:48 2008
@@ -39,6 +39,7 @@
#include <set>
#include <string>
+#include "gmref.h"
#include "chain-of-responsibility.h"
#include "form-request.h"
#include "menu-builder.h"
@@ -53,7 +54,7 @@
/** A presentity is a piece of presence information for a single URI.
*/
- class Presentity
+ class Presentity: public virtual GmRefCounted
{
public:
Modified: trunk/lib/engine/presence/skel/uri-presentity.cpp
==============================================================================
--- trunk/lib/engine/presence/skel/uri-presentity.cpp (original)
+++ trunk/lib/engine/presence/skel/uri-presentity.cpp Mon Nov 10 21:35:48 2008
@@ -93,7 +93,7 @@
Ekiga::URIPresentity::populate_menu (Ekiga::MenuBuilder &builder)
{
gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
- return presence_core->populate_presentity_menu (*this, uri, builder);
+ return presence_core->populate_presentity_menu (this, uri, builder);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]