src/pEpEngine.h
branchENGINE-74
changeset 1429 86c0e9def29c
parent 1397 0a64816a6e37
parent 1406 8d8ae9657388
child 1430 c4d6e7afbc57
     1.1 --- a/src/pEpEngine.h	Wed Nov 23 15:38:27 2016 +0100
     1.2 +++ b/src/pEpEngine.h	Wed Nov 23 20:54:28 2016 +0100
     1.3 @@ -417,21 +417,17 @@
     1.4  
     1.5  typedef enum _identity_flags {
     1.6      // the first octet flags are app defined settings
     1.7 -    PEP_idf_not_for_sync = 1,   // don't use this identity for sync
     1.8 -    PEP_idf_list = 2,           // identity of list of persons
     1.9 +    PEP_idf_not_for_sync = 0x0001,   // don't use this identity for sync
    1.10 +    PEP_idf_list = 0x0002,           // identity of list of persons
    1.11  
    1.12      // the second octet flags are calculated
    1.13 -    PEP_idf_devicegroup = 256   // identity of a device group member
    1.14 +    PEP_idf_devicegroup = 0x0100     // identity of a device group member
    1.15  } identity_flags;
    1.16  
    1.17  typedef unsigned int identity_flags_t;
    1.18  
    1.19 -typedef enum _keypair_flags {
    1.20 -    // the first octet flags are app defined settings
    1.21 -
    1.22 -    // the second octet flags are calculated
    1.23 -    PEP_kpf_own_key = 512   // key (was) used for own identity
    1.24 -} keypair_flags;
    1.25 +// typedef enum _keypair_flags {
    1.26 +// } keypair_flags;
    1.27  
    1.28  typedef unsigned int keypair_flags_t;
    1.29  
    1.30 @@ -599,6 +595,25 @@
    1.31          unsigned int flags
    1.32      );
    1.33  
    1.34 +// unset_identity_flags() - update identity flags on existing identity
    1.35 +//
    1.36 +//    parameters:
    1.37 +//        session (in)        session handle
    1.38 +//        identity (in,out)   pointer to pEp_identity structure
    1.39 +//        flags (in)          new value for flags
    1.40 +//
    1.41 +//    return value:
    1.42 +//        PEP_STATUS_OK = 0             encryption and signing succeeded
    1.43 +//        PEP_CANNOT_SET_IDENTITY       update of identity failed
    1.44 +//
    1.45 +//    caveat:
    1.46 +//        address and user_id must be given in identity
    1.47 +
    1.48 +DYNAMIC_API PEP_STATUS unset_identity_flags(
    1.49 +        PEP_SESSION session,
    1.50 +        pEp_identity *identity,
    1.51 +        unsigned int flags
    1.52 +    );
    1.53  
    1.54  // mark_as_compromized() - mark key in trust db as compromized
    1.55  //