ekiga r6080 - in trunk: . lib/engine/addressbook/call-history lib/engine/protocol/skel
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6080 - in trunk: . lib/engine/addressbook/call-history lib/engine/protocol/skel
- Date: Fri, 21 Mar 2008 14:48:14 +0000 (GMT)
Author: jpuydt
Date: Fri Mar 21 14:48:14 2008
New Revision: 6080
URL: http://svn.gnome.org/viewvc/ekiga?rev=6080&view=rev
Log:
First draft of having call history back
Modified:
trunk/ChangeLog
trunk/lib/engine/addressbook/call-history/Makefile.am
trunk/lib/engine/addressbook/call-history/history-book.cpp
trunk/lib/engine/addressbook/call-history/history-book.h
trunk/lib/engine/addressbook/call-history/history-contact.h
trunk/lib/engine/addressbook/call-history/history-main.cpp
trunk/lib/engine/addressbook/call-history/history-source.cpp
trunk/lib/engine/addressbook/call-history/history-source.h
trunk/lib/engine/protocol/skel/call-core.h
Modified: trunk/lib/engine/addressbook/call-history/Makefile.am
==============================================================================
--- trunk/lib/engine/addressbook/call-history/Makefile.am (original)
+++ trunk/lib/engine/addressbook/call-history/Makefile.am Fri Mar 21 14:48:14 2008
@@ -7,7 +7,8 @@
INCLUDES = \
-I$(top_srcdir)/lib/engine/framework \
-I$(top_srcdir)/lib/gmconf \
- -I$(top_srcdir)/lib/engine/addressbook/skel
+ -I$(top_srcdir)/lib/engine/addressbook/skel \
+ -I$(top_srcdir)/lib/engine/protocol/skel
libcall_history_la_SOURCES = \
$(call_history_dir)/history-contact.h \
Modified: trunk/lib/engine/addressbook/call-history/history-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-book.cpp (original)
+++ trunk/lib/engine/addressbook/call-history/history-book.cpp Fri Mar 21 14:48:14 2008
@@ -49,9 +49,6 @@
{
xmlNodePtr root;
- contact_core
- = dynamic_cast<Ekiga::ContactCore*>(core.get ("contact-core"));
-
const gchar *c_raw = gm_conf_get_string (KEY);
if (c_raw != NULL) {
@@ -81,6 +78,12 @@
root = xmlNewDocNode (doc, NULL, BAD_CAST "list", NULL);
xmlDocSetRootElement (doc, root);
}
+
+ Ekiga::CallCore *call_core
+ = dynamic_cast<Ekiga::CallCore*>(core.get ("call-core"));
+
+ call_core->missed_call.connect (sigc::mem_fun (this, &History::Book::on_missed_call));
+ call_core->cleared_call.connect (sigc::mem_fun (this, &History::Book::on_cleared_call));
}
History::Book::~Book ()
@@ -178,3 +181,24 @@
remove_contact (*begin ());
save ();
}
+
+void
+History::Book::on_missed_call (Ekiga::CallManager &/*manager*/,
+ Ekiga::Call &call)
+{
+ std::cout << "Missed call:" << std::endl
+ << "\twith: " << call.get_remote_party_name () << std::endl
+ << "\twhen: ???" << std::endl;
+}
+
+void
+History::Book::on_cleared_call (Ekiga::CallManager &/*manager*/,
+ Ekiga::Call &call,
+ std::string message)
+{
+ std::cout << "Normal call:" << std::endl
+ << "\twith: " << call.get_remote_party_name () << std::endl
+ << "\tdirection: " << (call.is_outgoing ()?"out":"in") << std::endl
+ << "\tduration: " << call.get_call_duration () << std::endl
+ << "\tended with: " << message << std::endl;
+}
Modified: trunk/lib/engine/addressbook/call-history/history-book.h
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-book.h (original)
+++ trunk/lib/engine/addressbook/call-history/history-book.h Fri Mar 21 14:48:14 2008
@@ -38,6 +38,8 @@
#include <libxml/tree.h>
+#include "call-core.h"
+
#include "book-impl.h"
#include "history-contact.h"
@@ -90,8 +92,14 @@
void common_add (Contact &contact);
+ void on_missed_call (Ekiga::CallManager &manager,
+ Ekiga::Call &call);
+
+ void on_cleared_call (Ekiga::CallManager &manager,
+ Ekiga::Call &call,
+ std::string message);
+
Ekiga::ServiceCore &core;
- Ekiga::ContactCore *contact_core;
xmlDocPtr doc;
};
Modified: trunk/lib/engine/addressbook/call-history/history-contact.h
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-contact.h (original)
+++ trunk/lib/engine/addressbook/call-history/history-contact.h Fri Mar 21 14:48:14 2008
@@ -62,7 +62,7 @@
public:
Contact (Ekiga::ServiceCore &_core,
- xmlNodePtr _node);
+ xmlNodePtr _node);
Contact (Ekiga::ServiceCore &_core,
const std::string _name,
Modified: trunk/lib/engine/addressbook/call-history/history-main.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-main.cpp (original)
+++ trunk/lib/engine/addressbook/call-history/history-main.cpp Fri Mar 21 14:48:14 2008
@@ -37,6 +37,7 @@
#include "history-main.h"
#include "contact-core.h"
+#include "call-core.h"
#include "history-source.h"
bool
@@ -46,12 +47,16 @@
{
bool result = false;
Ekiga::ContactCore *contact_core = NULL;
+ Ekiga::CallCore *call_core = NULL;
History::Source *source = NULL;
contact_core
= dynamic_cast<Ekiga::ContactCore*>(core.get ("contact-core"));
- if (contact_core != NULL) {
+ call_core
+ = dynamic_cast<Ekiga::CallCore*>(core.get ("call-core"));
+
+ if (contact_core != NULL && call_core != NULL) {
source = new History::Source (core);
core.add (*source);
Modified: trunk/lib/engine/addressbook/call-history/history-source.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-source.cpp (original)
+++ trunk/lib/engine/addressbook/call-history/history-source.cpp Fri Mar 21 14:48:14 2008
@@ -39,9 +39,6 @@
History::Source::Source (Ekiga::ServiceCore &_core): core(_core)
{
- contact_core
- = dynamic_cast<Ekiga::ContactCore*>(core.get ("contact-core"));
-
book = new Book (core);
add_book (*book);
Modified: trunk/lib/engine/addressbook/call-history/history-source.h
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-source.h (original)
+++ trunk/lib/engine/addressbook/call-history/history-source.h Fri Mar 21 14:48:14 2008
@@ -73,7 +73,6 @@
private:
Ekiga::ServiceCore &core;
- Ekiga::ContactCore *contact_core;
Book *book;
};
Modified: trunk/lib/engine/protocol/skel/call-core.h
==============================================================================
--- trunk/lib/engine/protocol/skel/call-core.h (original)
+++ trunk/lib/engine/protocol/skel/call-core.h Fri Mar 21 14:48:14 2008
@@ -115,7 +115,7 @@
/*** Call Related Signals ***/
- /** See call-manager.h for the API
+ /** See call.h for the API
*/
sigc::signal<void, CallManager &, Call &> setup_call;
sigc::signal<void, CallManager &, Call &> missed_call;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]