gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-37


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-377-gd7370cc
Date: Wed, 07 Mar 2012 17:04:42 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  d7370cc469c2ca79f4639f48f1eeeb3eed9061b6 (commit)
      from  a16b8960c139a88b53c33696fd5c480ba5603099 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=d7370cc469c2ca79f4639f48f1eeeb3eed9061b6


commit d7370cc469c2ca79f4639f48f1eeeb3eed9061b6
Author: Daniele Forsi <address@hidden>
Date:   Fri Feb 24 21:45:26 2012 +0100

    Parse phonebook subblock containing call duration in seconds
    
    Tested on S40 3rd (Nokia 5300).

diff --git a/ChangeLog b/ChangeLog
index f6c7c0f..b970aa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,9 @@
     o add support for phonebook memories SD (Service Dialling
       Numbers), MR (Message Recipients) and CL (Call Log)
                                                     (Daniele Forsi)
+    o parse call duration subblock found in Dialled Calls (DC),
+      Received Calls (RC) and Call Log (CL) phonebook entries;
+      output format is subject to change            (Daniele Forsi)
  * xgnokii updates
     o fix bug that caused to forget subentries after the first one
       when editing the phonebook                    (Daniele Forsi)
diff --git a/common/gsm-common.c b/common/gsm-common.c
index fabb0bb..8e8a76c 100644
--- a/common/gsm-common.c
+++ b/common/gsm-common.c
@@ -282,6 +282,7 @@ GNOKII_API const char 
*gn_phonebook_entry_type2str(gn_phonebook_entry_type t)
        case GN_PHONEBOOK_ENTRY_Nickname:               return _("Nickname");
        case GN_PHONEBOOK_ENTRY_Birthday:               return _("Birthday");
        case GN_PHONEBOOK_ENTRY_ExtGroup:               return _("Caller group 
id");
+       case GN_PHONEBOOK_ENTRY_CallDuration:           return _("Call 
duration");
        case GN_PHONEBOOK_ENTRY_Video:                  return _("Video");
        }
        return _("Unknown");
@@ -322,6 +323,7 @@ GNOKII_API const char 
*gn_subentrytype2string(gn_phonebook_entry_type entry_type
        case GN_PHONEBOOK_ENTRY_Birthday:
        case GN_PHONEBOOK_ENTRY_ExtGroup:
        case GN_PHONEBOOK_ENTRY_Video:
+       case GN_PHONEBOOK_ENTRY_CallDuration:
                return gn_phonebook_entry_type2str(entry_type);
        case GN_PHONEBOOK_ENTRY_Number:
                switch (number_type) {
diff --git a/common/nokia-decoding.c b/common/nokia-decoding.c
index 90fcb95..0f0c4e2 100644
--- a/common/nokia-decoding.c
+++ b/common/nokia-decoding.c
@@ -34,7 +34,7 @@ gn_error phonebook_decode(unsigned char *blockstart, int 
length, gn_data *data,
        int subblock_count = 0, i;
        gn_phonebook_entry *entry = data->phonebook_entry;
        gn_phonebook_subentry* subentry = NULL;
-
+       unsigned int seconds;
 
        dprintf("Parts: %d\n", blocks);
        for (i = 0; i < blocks; i++) {
@@ -293,6 +293,15 @@ gn_error phonebook_decode(unsigned char *blockstart, int 
length, gn_data *data,
                        subblock_count++;
                        data->phonebook_entry->subentries_count++;
                        break;
+               case GN_PHONEBOOK_ENTRY_CallDuration:
+                       subentry->entry_type = blockstart[0];
+                       seconds = blockstart[10] * 256 + blockstart[11];
+                       dprintf("   CallDuration: related to seq %d seconds 
%d\n", blockstart[5], seconds);
+                       snprintf(subentry->data.number, 
sizeof(subentry->data.number),
+                                "[%d] %d:%02d:%02d", blockstart[5], seconds / 
3600, seconds / 60, seconds % 60);
+                       subblock_count++;
+                       data->phonebook_entry->subentries_count++;
+                       break;
                case GN_PHONEBOOK_ENTRY_RingtoneAdv:   /* Newer ringtones */
                        switch(blockstart[15]) {
                        case 0x01:
diff --git a/common/vcard.c b/common/vcard.c
index da12018..a1887de 100644
--- a/common/vcard.c
+++ b/common/vcard.c
@@ -246,6 +246,7 @@ GNOKII_API char * gn_phonebook2vcardstr(gn_phonebook_entry 
*entry)
                case GN_PHONEBOOK_ENTRY_Ringtone:
                case GN_PHONEBOOK_ENTRY_RingtoneAdv:
                case GN_PHONEBOOK_ENTRY_Video:
+               case GN_PHONEBOOK_ENTRY_CallDuration:
                        /* Ignore */
                        break;
                case GN_PHONEBOOK_ENTRY_City:
diff --git a/include/gnokii/common.h b/include/gnokii/common.h
index 9957561..6d53018 100644
--- a/include/gnokii/common.h
+++ b/include/gnokii/common.h
@@ -224,6 +224,7 @@ typedef enum {
        GN_PHONEBOOK_ENTRY_UserID          = 0x38,
        GN_PHONEBOOK_ENTRY_PTTAddress      = 0x3f,
        GN_PHONEBOOK_ENTRY_ExtGroup        = 0x43,
+       GN_PHONEBOOK_ENTRY_CallDuration    = 0x44, /* Measured in seconds */
        GN_PHONEBOOK_ENTRY_Video           = 0x45, /* File ID */
        GN_PHONEBOOK_ENTRY_FirstName       = 0x46,
        GN_PHONEBOOK_ENTRY_LastName        = 0x47,

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |    3 +++
 common/gsm-common.c     |    2 ++
 common/nokia-decoding.c |   11 ++++++++++-
 common/vcard.c          |    1 +
 include/gnokii/common.h |    1 +
 5 files changed, 17 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]