ekiga r6184 - in trunk: . lib/engine/addressbook/call-history lib/engine/protocol/skel src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6184 - in trunk: . lib/engine/addressbook/call-history lib/engine/protocol/skel src/endpoints
- Date: Sat, 12 Apr 2008 22:49:44 +0100 (BST)
Author: dsandras
Date: Sat Apr 12 22:49:44 2008
New Revision: 6184
URL: http://svn.gnome.org/viewvc/ekiga?rev=6184&view=rev
Log:
Added method to return the start date of a call and its duration.
Used in the calls history.
Modified:
trunk/ChangeLog
trunk/lib/engine/addressbook/call-history/history-book.cpp
trunk/lib/engine/protocol/skel/call.h
trunk/src/endpoints/opal-call.cpp
trunk/src/endpoints/opal-call.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 Sat Apr 12 22:49:44 2008
@@ -34,6 +34,7 @@
*/
#include <iostream>
+#include <sstream>
#include <set>
#include "config.h"
@@ -203,9 +204,12 @@
History::Book::on_missed_call (Ekiga::CallManager &/*manager*/,
Ekiga::Call &call)
{
+ std::stringstream info;
+ info << call.get_start_time () << " " << call.get_duration ();
+
add (call.get_remote_party_name (),
call.get_remote_uri (),
- "FIXME: what to say? Idea: when?",
+ info.str (),
MISSED);
}
@@ -214,8 +218,10 @@
Ekiga::Call &call,
std::string /*message*/)
{
+ std::stringstream info;
+ info << call.get_start_time () << " " << call.get_duration ();
add (call.get_remote_party_name (),
call.get_remote_uri (),
- "FIXME: what to say? Idea: when? End message perhaps? Forget duration?",
+ info.str (),
(call.is_outgoing ()?PLACED:RECEIVED));
}
Modified: trunk/lib/engine/protocol/skel/call.h
==============================================================================
--- trunk/lib/engine/protocol/skel/call.h (original)
+++ trunk/lib/engine/protocol/skel/call.h Sat Apr 12 22:49:44 2008
@@ -126,6 +126,11 @@
*/
virtual const std::string get_duration () const = 0;
+ /** Return the call start date and time
+ * @return the current call start date and time
+ */
+ virtual const std::string get_start_time () const = 0;
+
/** Return information about call type
* @return true if it is an outgoing call
*/
Modified: trunk/src/endpoints/opal-call.cpp
==============================================================================
--- trunk/src/endpoints/opal-call.cpp (original)
+++ trunk/src/endpoints/opal-call.cpp Sat Apr 12 22:49:44 2008
@@ -225,6 +225,13 @@
}
+const std::string
+Opal::Call::get_start_time () const
+{
+ return (const char *) start_time.AsString (PTime::LongDateTime);
+}
+
+
void
Opal::Call::parse_info (OpalConnection & connection)
{
Modified: trunk/src/endpoints/opal-call.h
==============================================================================
--- trunk/src/endpoints/opal-call.h (original)
+++ trunk/src/endpoints/opal-call.h Sat Apr 12 22:49:44 2008
@@ -126,6 +126,12 @@
const std::string get_duration () const;
+ /** Return the call start date and time
+ * @return the current call start date and time
+ */
+ const std::string get_start_time () const;
+
+
public:
/* Implementation of inherited methods
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]