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-39


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-390-g457c0be
Date: Sat, 24 Mar 2012 11:20:41 +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  457c0be64e51d37b74e9c107738b1775f14f7aba (commit)
      from  21bf21894a59f28ea38860362a851a7f120e6b50 (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=457c0be64e51d37b74e9c107738b1775f14f7aba


commit 457c0be64e51d37b74e9c107738b1775f14f7aba
Author: Daniele Forsi <address@hidden>
Date:   Sat Mar 24 12:16:19 2012 +0100

    Add support for phonebook mmeory CB (Currently selected memory)
    
    Contents of CB depend on the choice made in phone UI in
    "Contacts/Settings/Memory in use" ie "SIM", "Phone" or "Phone and SIM"
    however "Phone and SIM" shows only phone contacts in the phones tested
    (a Nokia 5300 and a Nokia 8310).

diff --git a/ChangeLog b/ChangeLog
index 32c2091..35ed573 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,8 +34,8 @@
     o store also the seconds in date fields when reading phonebook
       entries from phone                            (Daniele Forsi)
     o add support for phonebook memories SD (Service Dialling
-      Numbers), MR (Message Recipients) and CL (Call Log)
-                                                    (Daniele Forsi)
+      Numbers), MR (Message Recipients), CL (Call Log) and
+      CB (Currently selected memory)                (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)
@@ -51,7 +51,7 @@
     o return more specific error codes for GN_OP_ReadPhonebook and
       for GN_OP_GetSMSCenter failures               (Daniele Forsi)
     o add support for phonebook memory SD (Service Dialling
-      Numbers)                                      (Daniele Forsi)
+      Numbers) and CB (Currently selected memory)   (Daniele Forsi)
     o change the value used for VOICE phonebook memory, containing
       the phone number(s) to be used to listen to voicemail, which
       was used for MT which now is unsupported      (Daniele Forsi)
diff --git a/Docs/protocol/nk6510.txt b/Docs/protocol/nk6510.txt
index 158a0df..3ba2bdc 100644
--- a/Docs/protocol/nk6510.txt
+++ b/Docs/protocol/nk6510.txt
@@ -108,6 +108,7 @@ Correct format is FBUS version 2/MBUS version 
2/IrDA/Bluetooth
                                      0x23: Extended Caller Groups
                                      0x27: Message Recipients
                                      0x28: Call Log
+                                     0xfe: Currently selected memory (SIM, 
phone or both)
 
     r Read memory           { 0x08, 0x00, 0x01,
                                     code, 0x00, 0x00, z, xH, xL, yH, yL, 
0x00[7], no.of blocks, { block } * }
diff --git a/Docs/protocol/nk7110.txt b/Docs/protocol/nk7110.txt
index edfda17..fd1ec2f 100644
--- a/Docs/protocol/nk7110.txt
+++ b/Docs/protocol/nk7110.txt
@@ -119,6 +119,7 @@ Correct format is FBUS version 2/MBUS version 2/IrDA
                                      0x0e: (10) speed dials
                                      0x0c: (10) SIM service dialling numbers
                                      0x10: (5) caller groups
+                                     0xfe: Currently selected memory (SIM, 
phone or both)
                                   y: location
     r Read memory           { 0x0108, 0x00, 0x01,
                              code,0x00, 0x00, z, xH, xL, yH, yL, 0x00, 0x00, 
0x00, no.of blocks, { block } * }
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index f4b62d2..654ba08 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -6529,9 +6529,6 @@ static int get_memory_type(gn_memory_type memory_type)
        int result;
 
        switch (memory_type) {
-       case GN_MT_MT:
-               result = NK6510_MEMORY_MT;
-               break;
        case GN_MT_ME:
                result = NK6510_MEMORY_ME;
                break;
@@ -6559,6 +6556,9 @@ static int get_memory_type(gn_memory_type memory_type)
        case GN_MT_SD:
                result = NK6510_MEMORY_SD;
                break;
+       case GN_MT_CB:
+               result = NK6510_MEMORY_CB;
+               break;
        case GN_MT_IN:
                result = NK6510_MEMORY_IN;
                break;
@@ -6763,12 +6763,12 @@ static gn_memory_type get_gn_memory_type_phonebook(int 
memory_type)
        case NK6510_MEMORY_EN:
                result = GN_MT_EN;
                break;
-       case NK6510_MEMORY_MT:
-               result = GN_MT_MT;
-               break;
        case NK6510_MEMORY_SD:
                result = GN_MT_SD;
                break;
+       case NK6510_MEMORY_CB:
+               result = GN_MT_CB;
+               break;
        case NK6510_MEMORY_MR:
                result = GN_MT_MR;
                break;
diff --git a/common/phones/nk7110.c b/common/phones/nk7110.c
index 1b8ba62..2bd74a2 100644
--- a/common/phones/nk7110.c
+++ b/common/phones/nk7110.c
@@ -732,12 +732,13 @@ static gn_error NK7110_IncomingPhonebook(int messagetype, 
unsigned char *message
                                return GN_ERR_UNHANDLEDFRAME;
                        }
                }
-               if (drvinst->ll_memtype != memtype || drvinst->ll_location != 
location) {
+               if ((drvinst->ll_memtype != memtype && drvinst->ll_memtype != 
NK7110_MEMORY_CB) || drvinst->ll_location != location) {
                        dprintf("skipping entry: ll_memtype: %d, memtype: %d, 
ll_location: %d, location: %d\n",
                                drvinst->ll_memtype, memtype, 
drvinst->ll_location, location);
                        return GN_ERR_UNSOLICITED;
                }
                dprintf("Received phonebook info\n");
+               data->phonebook_entry->memory_type = 
get_gn_memory_type(message[11]);
                blocks     = message[17];
                blockstart = message + 18;
                return phonebook_decode(blockstart, length - 17, data, blocks, 
message[11], 8);
@@ -3005,9 +3006,6 @@ static int get_memory_type(gn_memory_type memory_type)
        int result;
 
        switch (memory_type) {
-       case GN_MT_MT:
-               result = NK7110_MEMORY_MT;
-               break;
        case GN_MT_ME:
                result = NK7110_MEMORY_ME;
                break;
@@ -3035,6 +3033,9 @@ static int get_memory_type(gn_memory_type memory_type)
        case GN_MT_SD:
                result = NK7110_MEMORY_SD;
                break;
+       case GN_MT_CB:
+               result = NK7110_MEMORY_CB;
+               break;
        case GN_MT_IN:
                result = NK7110_MEMORY_IN;
                break;
@@ -3119,9 +3120,6 @@ static gn_memory_type get_gn_memory_type(int memory_type)
        int result;
 
        switch (memory_type) {
-       case NK7110_MEMORY_MT:
-               result = GN_MT_MT;
-               break;
        case NK7110_MEMORY_ME:
                result = GN_MT_ME;
                break;
@@ -3146,6 +3144,9 @@ static gn_memory_type get_gn_memory_type(int memory_type)
        case NK7110_MEMORY_SD:
                result = GN_MT_SD;
                break;
+       case NK7110_MEMORY_CB:
+               result = GN_MT_CB;
+               break;
        case NK7110_MEMORY_IN:
                result = GN_MT_IN;
                break;
diff --git a/include/phones/nk6510.h b/include/phones/nk6510.h
index b8a7137..871a279 100644
--- a/include/phones/nk6510.h
+++ b/include/phones/nk6510.h
@@ -135,6 +135,7 @@ typedef enum {
 #define NK6510_MEMORY_EXTGROUPS                0x23    /* Extended Caller 
Groups */
 #define NK6510_MEMORY_MR               0x27    /* Message Recipients */
 #define NK6510_MEMORY_CL               0x28    /* Call Log */
+#define NK6510_MEMORY_CB               0xfe    /* Currently selected memory 
(SIM, phone or both) */
 
 /* SMS Memory types */
 #define NK6510_MEMORY_IN               0x02    /* INBOX */
diff --git a/include/phones/nk7110.h b/include/phones/nk7110.h
index 3bfb733..acca576 100644
--- a/include/phones/nk7110.h
+++ b/include/phones/nk7110.h
@@ -126,6 +126,7 @@ typedef enum {
 #define NK7110_MEMORY_SD               0x0c    /* SIM Service Dialling Numbers 
*/
 #define NK7110_MEMORY_SPEEDDIALS       0x0e    /* Speed dials */
 #define NK7110_MEMORY_GROUPS           0x10    /* Caller groups */
+#define NK7110_MEMORY_CB               0xfe    /* Currently selected memory 
(SIM, phone or both) */
 
 /* SMS Memory types */
 #define NK7110_MEMORY_IN               0x08    /* INBOX */

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

Summary of changes:
 ChangeLog                |    6 +++---
 Docs/protocol/nk6510.txt |    1 +
 Docs/protocol/nk7110.txt |    1 +
 common/phones/nk6510.c   |   12 ++++++------
 common/phones/nk7110.c   |   15 ++++++++-------
 include/phones/nk6510.h  |    1 +
 include/phones/nk7110.h  |    1 +
 7 files changed, 21 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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