get_identity() is needing a user_id
authorVolker Birk <vb@pep-project.org>
Tue, 03 May 2016 16:27:25 +0200
changeset 70000c4f33e0f8
parent 69 8e47cec9271b
child 71 8d19e1c194f0
get_identity() is needing a user_id
CpEpEngine.cpp
CpEpEngine.h
pEpCOMServerAdapter.idl
     1.1 --- a/CpEpEngine.cpp	Fri Apr 29 15:30:10 2016 +0200
     1.2 +++ b/CpEpEngine.cpp	Tue May 03 16:27:25 2016 +0200
     1.3 @@ -510,20 +510,24 @@
     1.4      return S_OK;
     1.5  }
     1.6  
     1.7 -STDMETHODIMP CpEpEngine::get_identity(BSTR address, pEp_identity_s * ident)
     1.8 +STDMETHODIMP CpEpEngine::get_identity(BSTR address, BSTR user_id, pEp_identity_s * ident)
     1.9  {
    1.10      assert(address);
    1.11 +    assert(user_id);
    1.12      assert(ident);
    1.13  
    1.14      if (address == NULL)
    1.15          return E_INVALIDARG;
    1.16 -
    1.17 +    if (user_id == NULL)
    1.18 +        return E_INVALIDARG;
    1.19      if (ident == NULL)
    1.20          return E_INVALIDARG;
    1.21  
    1.22      string _address = utf8_string(address);
    1.23 +    string _user_id = utf8_string(user_id);
    1.24 +
    1.25      ::pEp_identity *_ident = NULL;
    1.26 -    PEP_STATUS status = ::get_identity(get_session(), _address.c_str(), &_ident);
    1.27 +    PEP_STATUS status = ::get_identity(get_session(), _address.c_str(), _user_id.c_str(), &_ident);
    1.28      assert(status != PEP_OUT_OF_MEMORY);
    1.29      if (status == PEP_OUT_OF_MEMORY)
    1.30          return E_OUTOFMEMORY;
     2.1 --- a/CpEpEngine.h	Fri Apr 29 15:30:10 2016 +0200
     2.2 +++ b/CpEpEngine.h	Tue May 03 16:27:25 2016 +0200
     2.3 @@ -144,7 +144,7 @@
     2.4      STDMETHOD(encrypt_b)(SAFEARRAY * key_list, SAFEARRAY * ptext, BSTR * ctext, pEp_STATUS * status);
     2.5      STDMETHOD(trustword)(LONG value, BSTR lang, BSTR * word);
     2.6      STDMETHOD(trustwords)(BSTR fpr, BSTR lang, LONG max_words, BSTR * words);
     2.7 -    STDMETHOD(get_identity)(BSTR address, pEp_identity_s * ident);
     2.8 +    STDMETHOD(get_identity)(BSTR address, BSTR user_id, pEp_identity_s * ident);
     2.9      STDMETHOD(set_identity)(pEp_identity_s * ident);
    2.10      STDMETHOD(generate_keypair)(pEp_identity_s * ident, BSTR * fpr);
    2.11      STDMETHOD(delete_keypair)(BSTR fpr);
     3.1 --- a/pEpCOMServerAdapter.idl	Fri Apr 29 15:30:10 2016 +0200
     3.2 +++ b/pEpCOMServerAdapter.idl	Tue May 03 16:27:25 2016 +0200
     3.3 @@ -156,7 +156,7 @@
     3.4          BSTR lang;
     3.5      };
     3.6  
     3.7 -    HRESULT get_identity([in] BSTR address, [out, retval] struct pEp_identity_s * ident);
     3.8 +    HRESULT get_identity([in] BSTR address, [in] BSTR user_id, [out, retval] struct pEp_identity_s * ident);
     3.9      HRESULT set_identity([in] struct pEp_identity_s * ident);
    3.10      HRESULT generate_keypair([in] struct pEp_identity_s * ident, [out, retval] BSTR * fpr);
    3.11      HRESULT delete_keypair([in] BSTR fpr);