Browse Source

get_identity() is needing a user_id

COM-121
Volker Birk 6 years ago
parent
commit
986efa18ec
3 changed files with 9 additions and 5 deletions
  1. +7
    -3
      CpEpEngine.cpp
  2. +1
    -1
      CpEpEngine.h
  3. +1
    -1
      pEpCOMServerAdapter.idl

+ 7
- 3
CpEpEngine.cpp View File

@ -510,20 +510,24 @@ STDMETHODIMP CpEpEngine::get_phrase(BSTR lang, LONG phrase_id, BSTR * phrase)
return S_OK;
}
STDMETHODIMP CpEpEngine::get_identity(BSTR address, pEp_identity_s * ident)
STDMETHODIMP CpEpEngine::get_identity(BSTR address, BSTR user_id, pEp_identity_s * ident)
{
assert(address);
assert(user_id);
assert(ident);
if (address == NULL)
return E_INVALIDARG;
if (user_id == NULL)
return E_INVALIDARG;
if (ident == NULL)
return E_INVALIDARG;
string _address = utf8_string(address);
string _user_id = utf8_string(user_id);
::pEp_identity *_ident = NULL;
PEP_STATUS status = ::get_identity(get_session(), _address.c_str(), &_ident);
PEP_STATUS status = ::get_identity(get_session(), _address.c_str(), _user_id.c_str(), &_ident);
assert(status != PEP_OUT_OF_MEMORY);
if (status == PEP_OUT_OF_MEMORY)
return E_OUTOFMEMORY;


+ 1
- 1
CpEpEngine.h View File

@ -144,7 +144,7 @@ public:
STDMETHOD(encrypt_b)(SAFEARRAY * key_list, SAFEARRAY * ptext, BSTR * ctext, pEp_STATUS * status);
STDMETHOD(trustword)(LONG value, BSTR lang, BSTR * word);
STDMETHOD(trustwords)(BSTR fpr, BSTR lang, LONG max_words, BSTR * words);
STDMETHOD(get_identity)(BSTR address, pEp_identity_s * ident);
STDMETHOD(get_identity)(BSTR address, BSTR user_id, pEp_identity_s * ident);
STDMETHOD(set_identity)(pEp_identity_s * ident);
STDMETHOD(generate_keypair)(pEp_identity_s * ident, BSTR * fpr);
STDMETHOD(delete_keypair)(BSTR fpr);


+ 1
- 1
pEpCOMServerAdapter.idl View File

@ -156,7 +156,7 @@ interface IpEpEngine : IUnknown {
BSTR lang;
};
HRESULT get_identity([in] BSTR address, [out, retval] struct pEp_identity_s * ident);
HRESULT get_identity([in] BSTR address, [in] BSTR user_id, [out, retval] struct pEp_identity_s * ident);
HRESULT set_identity([in] struct pEp_identity_s * ident);
HRESULT generate_keypair([in] struct pEp_identity_s * ident, [out, retval] BSTR * fpr);
HRESULT delete_keypair([in] BSTR fpr);


Loading…
Cancel
Save