adding flags
authorVolker Birk <vb@pep-project.org>
Wed, 23 Nov 2016 16:45:55 +0100
changeset 2177ebb44e5bf85
parent 216 6a08f0334e8a
child 218 ef80732697e6
adding flags
pEpCOMServerAdapter.idl
pEp_utility.cpp
pEp_utility.h
     1.1 --- a/pEpCOMServerAdapter.idl	Wed Nov 23 16:02:58 2016 +0100
     1.2 +++ b/pEpCOMServerAdapter.idl	Wed Nov 23 16:45:55 2016 +0100
     1.3 @@ -115,6 +115,13 @@
     1.4          pEpCtpEp = 0xff
     1.5      } pEpComType;
     1.6  
     1.7 +	typedef [v1_enum] enum pEpIdentityFlags {
     1.8 +		pEpIdfNone = 0,
     1.9 +		pEpIdfNotForSync = 0x0001,
    1.10 +		pEpIdfList = 0x0002,
    1.11 +		pEpIdfDevicegroup = 0x0100
    1.12 +	} pEpIdentityFlags;
    1.13 +
    1.14      [uuid(C3A3814E-567F-4D1C-9F44-9B1DA3957A89)] struct pEpIdentity {
    1.15          BSTR Address;
    1.16          BSTR Fpr;
    1.17 @@ -122,6 +129,7 @@
    1.18          BSTR UserName;
    1.19          pEpComType CommType;
    1.20          BSTR Lang;
    1.21 +		int Flags;
    1.22      };
    1.23  
    1.24      // Keymanagement API
     2.1 --- a/pEp_utility.cpp	Wed Nov 23 16:02:58 2016 +0100
     2.2 +++ b/pEp_utility.cpp	Wed Nov 23 16:45:55 2016 +0100
     2.3 @@ -21,6 +21,7 @@
     2.4                  username = _ident->username;
     2.5              comm_type = (pEpComType) _ident->comm_type;
     2.6              lang = _ident->lang;
     2.7 +			flags = (int) _ident->flags;
     2.8          }
     2.9  
    2.10          pEp_identity_cpp::pEp_identity_cpp(const pEpIdentity *_ident)
    2.11 @@ -40,6 +41,7 @@
    2.12              comm_type = _ident->CommType;
    2.13              if (_ident->Lang)
    2.14                  lang = utf8_string(_ident->Lang);
    2.15 +			flags = (int)_ident->Flags;
    2.16          }
    2.17  
    2.18          pEp_identity * pEp_identity_cpp::to_pEp_identity()
    2.19 @@ -59,6 +61,8 @@
    2.20                  _ident->lang[1] = this->lang[1];
    2.21              }
    2.22  
    2.23 +			_ident->flags = (identity_flags) this->flags;
    2.24 +
    2.25              return _ident;
    2.26          }
    2.27  
    2.28 @@ -75,6 +79,7 @@
    2.29              _ident->Lang = utf16_bstr(this->lang);
    2.30              _ident->UserName = utf16_bstr(this->username);
    2.31              _ident->UserId = utf16_bstr(this->user_id);
    2.32 +			_ident->Flags = this->flags;
    2.33  
    2.34              return _ident;
    2.35          }
    2.36 @@ -98,6 +103,7 @@
    2.37                  ident_s->CommType = (pEpComType) ident->comm_type;
    2.38                  if (ident->lang)
    2.39                      ident_s->Lang = utf16_bstr(ident->lang);
    2.40 +				ident_s->Flags = (int) ident->flags;
    2.41              }
    2.42          }
    2.43  
    2.44 @@ -157,6 +163,8 @@
    2.45                  }
    2.46              }
    2.47  
    2.48 +			_ident->flags = (identity_flags_t)ident->Flags;
    2.49 +
    2.50              return _ident;
    2.51          }
    2.52  
     3.1 --- a/pEp_utility.h	Wed Nov 23 16:02:58 2016 +0100
     3.2 +++ b/pEp_utility.h	Wed Nov 23 16:45:55 2016 +0100
     3.3 @@ -17,6 +17,7 @@
     3.4              pEpComType comm_type;
     3.5              string lang;
     3.6              bool me;
     3.7 +			int flags;
     3.8  
     3.9              pEp_identity_cpp(
    3.10                  string _address = string(),