ekiga r7418 - trunk/lib/engine/chat/echo
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7418 - trunk/lib/engine/chat/echo
- Date: Tue, 25 Nov 2008 19:18:56 +0000 (UTC)
Author: jpuydt
Date: Tue Nov 25 19:18:56 2008
New Revision: 7418
URL: http://svn.gnome.org/viewvc/ekiga?rev=7418&view=rev
Log:
Made the echo chat code use gmref_ptr too
Modified:
trunk/lib/engine/chat/echo/echo-dialect.cpp
trunk/lib/engine/chat/echo/echo-main.cpp
trunk/lib/engine/chat/echo/echo-simple.cpp
trunk/lib/engine/chat/echo/echo-simple.h
Modified: trunk/lib/engine/chat/echo/echo-dialect.cpp
==============================================================================
--- trunk/lib/engine/chat/echo/echo-dialect.cpp (original)
+++ trunk/lib/engine/chat/echo/echo-dialect.cpp Tue Nov 25 19:18:56 2008
@@ -60,7 +60,7 @@
void
Echo::Dialect::new_chat ()
{
- SimpleChat* chat = new SimpleChat ();
+ gmref_ptr<SimpleChat> chat (new SimpleChat);
add_simple_chat (chat);
chat->user_requested.emit ();
}
Modified: trunk/lib/engine/chat/echo/echo-main.cpp
==============================================================================
--- trunk/lib/engine/chat/echo/echo-main.cpp (original)
+++ trunk/lib/engine/chat/echo/echo-main.cpp Tue Nov 25 19:18:56 2008
@@ -51,7 +51,7 @@
gmref_ptr<Echo::Dialect> dialect (new Echo::Dialect);
core.add (dialect);
- chat_core->add_dialect (*dialect);
+ chat_core->add_dialect (dialect);
result = true;
}
Modified: trunk/lib/engine/chat/echo/echo-simple.cpp
==============================================================================
--- trunk/lib/engine/chat/echo/echo-simple.cpp (original)
+++ trunk/lib/engine/chat/echo/echo-simple.cpp Tue Nov 25 19:18:56 2008
@@ -61,17 +61,17 @@
}
void
-Echo::SimpleChat::connect (Ekiga::ChatObserver &observer)
+Echo::SimpleChat::connect (gmref_ptr<Ekiga::ChatObserver> observer)
{
- observer.notice ("This is just an echo chat : type and see back");
+ observer->notice ("This is just an echo chat : type and see back");
- observers.push_front (&observer);
+ observers.push_front (observer);
}
void
-Echo::SimpleChat::disconnect (Ekiga::ChatObserver &observer)
+Echo::SimpleChat::disconnect (gmref_ptr<Ekiga::ChatObserver> observer)
{
- observers.remove (&observer);
+ observers.remove (observer);
if (observers.empty ())
removed.emit ();
@@ -80,7 +80,7 @@
bool
Echo::SimpleChat::send_message (const std::string msg)
{
- for (std::list<Ekiga::ChatObserver*>::iterator iter = observers.begin ();
+ for (std::list<gmref_ptr<Ekiga::ChatObserver> >::iterator iter = observers.begin ();
iter != observers.end ();
++iter)
(*iter)->message ("Echo", msg);
Modified: trunk/lib/engine/chat/echo/echo-simple.h
==============================================================================
--- trunk/lib/engine/chat/echo/echo-simple.h (original)
+++ trunk/lib/engine/chat/echo/echo-simple.h Tue Nov 25 19:18:56 2008
@@ -51,9 +51,9 @@
const std::string get_title() const;
- void connect (Ekiga::ChatObserver &observer);
+ void connect (gmref_ptr<Ekiga::ChatObserver> observer);
- void disconnect (Ekiga::ChatObserver &observer);
+ void disconnect (gmref_ptr<Ekiga::ChatObserver> observer);
bool send_message (const std::string msg);
@@ -63,7 +63,7 @@
private:
- std::list<Ekiga::ChatObserver*> observers;
+ std::list<gmref_ptr<Ekiga::ChatObserver> > observers;
gmref_ptr<Presentity> presentity;
};
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]