some flagging keysync
authorVolker Birk <vb@pep.foundation>
Sun, 31 Jul 2016 00:17:08 +0200
branchkeysync
changeset 9454474a1ae092e
parent 944 e97cf5e73b64
child 946 d50f4f731ec9
some flagging
src/pEpEngine.c
src/pEpEngine.h
     1.1 --- a/src/pEpEngine.c	Sun Jul 31 00:06:35 2016 +0200
     1.2 +++ b/src/pEpEngine.c	Sun Jul 31 00:17:08 2016 +0200
     1.3 @@ -285,7 +285,8 @@
     1.4          sql_log = "insert into log (title, entity, description, comment)"
     1.5                    "values (?1, ?2, ?3, ?4);";
     1.6  
     1.7 -        sql_get_identity =  "select fpr, username, comm_type, lang, identity.flags"
     1.8 +        sql_get_identity =  "select fpr, username, comm_type, lang,"
     1.9 +                            "   identity.flags | pgp_keypair.flags"
    1.10                              "   from identity"
    1.11                              "   join person on id = identity.user_id"
    1.12                              "   join pgp_keypair on fpr = identity.main_key_id"
     2.1 --- a/src/pEpEngine.h	Sun Jul 31 00:06:35 2016 +0200
     2.2 +++ b/src/pEpEngine.h	Sun Jul 31 00:17:08 2016 +0200
     2.3 @@ -380,8 +380,12 @@
     2.4  } PEP_comm_type;
     2.5  
     2.6  typedef enum _identity_flags {
     2.7 +    // flags set by application
     2.8      PEP_idf_not_for_sync = 1,   // don't use this identity for sync
     2.9 -    PEP_idf_group = 2           // identity of group of persons
    2.10 +    PEP_idf_group = 2,          // identity of group of persons
    2.11 +
    2.12 +    // flags set by key sync implementation
    2.13 +    PEP_idf_device_group = 256  // own identity member of device group
    2.14  } identity_flags;
    2.15  
    2.16  typedef unsigned int identity_flags_t;