Browse Source

adding support for opt_fields

COM-121
Volker Birk 7 years ago
parent
commit
86f1a7ef32
7 changed files with 299 additions and 143 deletions
  1. +4
    -4
      CpEpEngine.cpp
  2. +242
    -127
      TextMessage.cpp
  3. +3
    -0
      TextMessage.h
  4. +13
    -3
      pEpCOMServerAdapter.idl
  5. +1
    -1
      pEpCOMServerAdapter_i.c
  6. +35
    -8
      pEpCOMServerAdapter_i.h
  7. +1
    -0
      stdafx.h

+ 4
- 4
CpEpEngine.cpp View File

@ -853,10 +853,10 @@ STDMETHODIMP CpEpEngine::encrypt_message(ITextMessage * src, ITextMessage ** dst
try {
_extra = new_stringlist(extra);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
}
@ -984,10 +984,10 @@ STDMETHODIMP CpEpEngine::identity_color(struct pEp_identity_s *ident, pEp_color
try {
_ident = new_identity(ident);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}


+ 242
- 127
TextMessage.cpp View File

@ -30,10 +30,10 @@ STDMETHODIMP CTextMessage::get_from(pEp_identity_s* pVal)
try {
copy_identity(pVal, msg->from);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
@ -50,10 +50,10 @@ STDMETHODIMP CTextMessage::put_from(pEp_identity_s* newVal)
try {
_from = new_identity(newVal);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e)
catch (exception&)
{
return E_FAIL;
}
@ -81,12 +81,12 @@ STDMETHODIMP CTextMessage::get_to(LPSAFEARRAY * pVal)
try {
copy_identity(&cs[i], il->ident);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_FAIL;
@ -119,21 +119,22 @@ STDMETHODIMP CTextMessage::put_to(SAFEARRAY * newVal)
}
identity_list *_il;
LONG i, lbound, ubound;
LONG lbound, ubound;
ULONG i;
SafeArrayGetLBound(newVal, 1, &lbound);
SafeArrayGetUBound(newVal, 1, &ubound);
for (i = lbound, _il = il; i <= ubound; i++) {
for (i = 0, _il = il; i < newVal->cbElements; i++) {
pEp_identity * ident;
try {
ident = new_identity(&cs[i]);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_FAIL;
@ -161,10 +162,10 @@ STDMETHODIMP CTextMessage::get_recv_by(pEp_identity_s* pVal)
try {
copy_identity(pVal, msg->recv_by);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
@ -181,10 +182,10 @@ STDMETHODIMP CTextMessage::put_recv_by(pEp_identity_s* newVal)
try {
_recv_by = new_identity(newVal);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
@ -211,12 +212,12 @@ STDMETHODIMP CTextMessage::get_cc(LPSAFEARRAY * pVal)
try {
copy_identity(&cs[i], il->ident);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_FAIL;
@ -249,21 +250,22 @@ STDMETHODIMP CTextMessage::put_cc(SAFEARRAY * newVal)
}
identity_list *_il;
LONG i, lbound, ubound;
LONG lbound, ubound;
ULONG i;
SafeArrayGetLBound(newVal, 1, &lbound);
SafeArrayGetUBound(newVal, 1, &ubound);
for (i = lbound, _il = il; i <= ubound; i++) {
for (i = 0, _il = il; i < newVal->cbElements; i++) {
pEp_identity * ident;
try {
ident = new_identity(&cs[i]);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_FAIL;
@ -302,12 +304,12 @@ STDMETHODIMP CTextMessage::get_bcc(LPSAFEARRAY * pVal)
try {
copy_identity(&cs[i], il->ident);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_FAIL;
@ -340,21 +342,22 @@ STDMETHODIMP CTextMessage::put_bcc(SAFEARRAY * newVal)
}
identity_list *_il;
LONG i, lbound, ubound;
LONG lbound, ubound;
ULONG i;
SafeArrayGetLBound(newVal, 1, &lbound);
SafeArrayGetUBound(newVal, 1, &ubound);
for (i = lbound, _il = il; i <= ubound; i++) {
for (i = 0, _il = il; i < newVal->cbElements; i++) {
pEp_identity * ident;
try {
ident = new_identity(&cs[i]);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_FAIL;
@ -393,12 +396,12 @@ STDMETHODIMP CTextMessage::get_reply_to(LPSAFEARRAY * pVal)
try {
copy_identity(&cs[i], il->ident);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_FAIL;
@ -431,21 +434,22 @@ STDMETHODIMP CTextMessage::put_reply_to(SAFEARRAY * newVal)
}
identity_list *_il;
LONG i, lbound, ubound;
LONG lbound, ubound;
ULONG i;
SafeArrayGetLBound(newVal, 1, &lbound);
SafeArrayGetUBound(newVal, 1, &ubound);
for (i = lbound, _il = il; i <= ubound; i++) {
for (i = 0, _il = il; i < newVal->cbElements; i++) {
pEp_identity * ident;
try {
ident = new_identity(&cs[i]);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
SafeArrayUnaccessData(newVal);
free_identity_list(il);
return E_FAIL;
@ -492,10 +496,10 @@ STDMETHODIMP CTextMessage::get_id(BSTR * pVal)
try {
val = utf16_bstr(msg->id);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
*pVal = val.Detach();
@ -506,27 +510,29 @@ STDMETHODIMP CTextMessage::get_id(BSTR * pVal)
STDMETHODIMP CTextMessage::put_id(BSTR newVal)
{
assert(newVal);
char *_val = NULL;
string val;
try {
val = utf8_string(newVal);
}
catch (bad_alloc& e) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
return E_FAIL;
if (newVal) {
try {
val = utf8_string(newVal);
}
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception&) {
return E_FAIL;
}
_val = _strdup(val.c_str());
if (_val == NULL)
return E_OUTOFMEMORY;
}
if (msg->id)
free(msg->id);
msg->id = _strdup(val.c_str());
if (msg->id == NULL)
return E_OUTOFMEMORY;
msg->id = _val;
return S_OK;
}
@ -540,10 +546,10 @@ STDMETHODIMP CTextMessage::get_shortmsg(BSTR * pVal)
try {
val = utf16_bstr(msg->shortmsg);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
*pVal = val.Detach();
@ -554,27 +560,30 @@ STDMETHODIMP CTextMessage::get_shortmsg(BSTR * pVal)
STDMETHODIMP CTextMessage::put_shortmsg(BSTR newVal)
{
assert(newVal);
char *_val = NULL;
string val;
if (newVal) {
string val;
try {
val = utf8_string(newVal);
}
catch (bad_alloc& e) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
return E_FAIL;
try {
val = utf8_string(newVal);
}
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception&) {
return E_FAIL;
}
_val = _strdup(val.c_str());
if (_val == NULL)
return E_OUTOFMEMORY;
}
if (msg->shortmsg)
free(msg->shortmsg);
msg->shortmsg = _strdup(val.c_str());
if (msg->shortmsg == NULL)
return E_OUTOFMEMORY;
msg->shortmsg = _val;
return S_OK;
}
@ -588,10 +597,10 @@ STDMETHODIMP CTextMessage::get_longmsg(BSTR * pVal)
try {
val = utf16_bstr(msg->longmsg);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
*pVal = val.Detach();
@ -602,27 +611,30 @@ STDMETHODIMP CTextMessage::get_longmsg(BSTR * pVal)
STDMETHODIMP CTextMessage::put_longmsg(BSTR newVal)
{
assert(newVal);
char * _val = NULL;
string val;
if (newVal) {
string val;
try {
val = utf8_string(newVal);
}
catch (bad_alloc& e) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
return E_FAIL;
try {
val = utf8_string(newVal);
}
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception&) {
return E_FAIL;
}
_val = _strdup(val.c_str());
if (_val == NULL)
return E_OUTOFMEMORY;
}
if (msg->longmsg)
free(msg->longmsg);
msg->longmsg = _strdup(val.c_str());
if (msg->longmsg == NULL)
return E_OUTOFMEMORY;
msg->longmsg = _val;
return S_OK;
}
@ -636,10 +648,10 @@ STDMETHODIMP CTextMessage::get_longmsg_formatted(BSTR * pVal)
try {
val = utf16_bstr(msg->longmsg_formatted);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
*pVal = val.Detach();
@ -650,27 +662,30 @@ STDMETHODIMP CTextMessage::get_longmsg_formatted(BSTR * pVal)
STDMETHODIMP CTextMessage::put_longmsg_formatted(BSTR newVal)
{
assert(newVal);
char *_val = NULL;
string val;
if (newVal) {
string val;
try {
val = utf8_string(newVal);
}
catch (bad_alloc& e) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
return E_FAIL;
try {
val = utf8_string(newVal);
}
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception&) {
return E_FAIL;
}
_val = _strdup(val.c_str());
if (_val == NULL)
return E_OUTOFMEMORY;
}
if (msg->longmsg_formatted)
free(msg->longmsg_formatted);
msg->longmsg_formatted = _strdup(val.c_str());
if (msg->longmsg_formatted == NULL)
return E_OUTOFMEMORY;
msg->longmsg_formatted = _val;
return S_OK;
}
@ -683,12 +698,13 @@ STDMETHODIMP CTextMessage::add_attachment(SAFEARRAY * data, BSTR mime_type, BSTR
CComSafeArray<BYTE> sa_data(data);
size_t len = sa_data.GetCount();
char *_data = (char *) malloc(sa_data.GetCount());
char *_data = (char *) malloc(sa_data.GetCount() + 1);
assert(_data);
if (_data == NULL)
return E_OUTOFMEMORY;
memcpy(_data, sa_data.m_psa->pvData, len);
_data[len] = 0;
sa_data.Detach();
string _mime_type;
@ -696,11 +712,11 @@ STDMETHODIMP CTextMessage::add_attachment(SAFEARRAY * data, BSTR mime_type, BSTR
try {
_mime_type = utf8_string(mime_type);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
free(_data);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
free(_data);
return E_FAIL;
}
@ -711,11 +727,11 @@ STDMETHODIMP CTextMessage::add_attachment(SAFEARRAY * data, BSTR mime_type, BSTR
try {
_filename = utf8_string(filename);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
free(_data);
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
free(_data);
return E_FAIL;
}
@ -763,7 +779,7 @@ STDMETHODIMP CTextMessage::next_attachment(SAFEARRAY ** data, BSTR * mime_type,
try {
sa.Create(m_next_attachment->size);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
@ -774,10 +790,10 @@ STDMETHODIMP CTextMessage::next_attachment(SAFEARRAY ** data, BSTR * mime_type,
try {
_mime_type = utf16_bstr(m_next_attachment->mime_type);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
}
@ -787,10 +803,10 @@ STDMETHODIMP CTextMessage::next_attachment(SAFEARRAY ** data, BSTR * mime_type,
try {
_filename = utf16_bstr(m_next_attachment->filename);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
}
@ -866,10 +882,10 @@ STDMETHODIMP CTextMessage::get_references(SAFEARRAY ** pVal)
sa.Create(0UL);
}
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
@ -886,10 +902,10 @@ STDMETHODIMP CTextMessage::put_references(SAFEARRAY * newVal)
try {
sl = new_stringlist(newVal);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
@ -914,10 +930,10 @@ STDMETHODIMP CTextMessage::get_keywords(SAFEARRAY ** pVal)
sa.Create(0UL);
}
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
@ -934,10 +950,10 @@ STDMETHODIMP CTextMessage::put_keywords(SAFEARRAY * newVal)
try {
sl = new_stringlist(newVal);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
@ -959,10 +975,10 @@ STDMETHODIMP CTextMessage::get_comments(BSTR * pVal)
try {
val = utf16_bstr(msg->comments);
}
catch (bad_alloc& e) {
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception& e) {
catch (exception&) {
return E_FAIL;
}
*pVal = val.Detach();
@ -973,26 +989,125 @@ STDMETHODIMP CTextMessage::get_comments(BSTR * pVal)
STDMETHODIMP CTextMessage::put_comments(BSTR newVal)
{
assert(newVal);
char * _val = NULL;
string val;
if (newVal) {
string val;
try {
val = utf8_string(newVal);
try {
val = utf8_string(newVal);
}
catch (bad_alloc&) {
return E_OUTOFMEMORY;
}
catch (exception&) {
return E_FAIL;
}
_val = _strdup(val.c_str());
if (_val == NULL)
return E_OUTOFMEMORY;
}
catch (bad_alloc& e) {
if (msg->comments)
free(msg->comments);
msg->comments = _val;
return S_OK;
}
STDMETHODIMP CTextMessage::get_opt_fields(LPSAFEARRAY * pVal)
{
assert(pVal);
int len = stringpair_list_length(msg->opt_fields);
LPSAFEARRAY sa = newSafeArray<opt_field_t>(len);
if (sa == NULL)
return E_OUTOFMEMORY;
opt_field_t *cs = accessData<opt_field_t>(sa);
stringpair_list_t *il;
ULONG i;
for (i = 0, il = msg->opt_fields; il && il->value; il = il->next, i++) {
try {
_bstr_t key = utf16_bstr(il->value->key);
_bstr_t value = utf16_bstr(il->value->value);
cs[i].name = key.Detach();
cs[i].value = value.Detach();
}
catch (bad_alloc&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_OUTOFMEMORY;
}
catch (exception&) {
SafeArrayUnaccessData(sa);
SafeArrayDestroy(sa);
return E_FAIL;
}
}
catch (exception& e) {
SafeArrayUnaccessData(sa);
*pVal = sa;
return S_OK;
}
STDMETHODIMP CTextMessage::put_opt_fields(SAFEARRAY * newVal)
{
assert(newVal);
if (newVal == NULL)
return E_INVALIDARG;
stringpair_list_t *il = new_stringpair_list(NULL);
if (il == NULL)
return E_OUTOFMEMORY;
opt_field_t *cs;
HRESULT hr = SafeArrayAccessData(newVal, (void **) &cs);
assert(SUCCEEDED(hr) && cs);
if (cs == NULL) {
free_stringpair_list(il);
return E_FAIL;
}
if (msg->comments)
free(msg->comments);
stringpair_list_t *_il;
LONG lbound, ubound;
ULONG i;
SafeArrayGetLBound(newVal, 1, &lbound);
SafeArrayGetUBound(newVal, 1, &ubound);
msg->comments = _strdup(val.c_str());
if (msg->comments == NULL)
return E_OUTOFMEMORY;
for (i = 0, _il = il; i < newVal->cbElements; i++) {
stringpair_t * pair;
try {
pair = new_stringpair(utf8_string(cs[i].name).c_str(), utf8_string(cs[i].value).c_str());
}
catch (bad_alloc&) {
SafeArrayUnaccessData(newVal);
free_stringpair_list(il);
return E_OUTOFMEMORY;
}
catch (exception&) {
SafeArrayUnaccessData(newVal);
free_stringpair_list(il);
return E_FAIL;
}
_il = stringpair_list_add(_il, pair);
if (_il == NULL) {
SafeArrayUnaccessData(newVal);
free_stringpair_list(il);
return E_OUTOFMEMORY;
}
}
SafeArrayUnaccessData(newVal);
free_stringpair_list(msg->opt_fields);
msg->opt_fields = il;
return S_OK;
}

+ 3
- 0
TextMessage.h View File

@ -137,6 +137,9 @@ public:
STDMETHOD(get_comments)(BSTR * pVal);
STDMETHOD(put_comments)(BSTR newVal);
STDMETHOD(get_opt_fields)(LPSAFEARRAY * pVal);
STDMETHOD(put_opt_fields)(SAFEARRAY * newVal);
};
OBJECT_ENTRY_AUTO(__uuidof(TextMessage), CTextMessage)

+ 13
- 3
pEpCOMServerAdapter.idl View File

@ -41,6 +41,13 @@ interface ITextMessage : IUnknown {
pEp_enc_pEp // pEp encryption format
} pEp_enc_format;
[uuid(1292C31A-6486-427F-B29F-7F03607836DC)] struct _opt_field {
BSTR name;
BSTR value;
};
typedef struct _opt_field opt_field_t;
[propget] HRESULT dir([out, retval] pEp_msg_direction *pVal);
[propput] HRESULT dir([in] pEp_msg_direction newVal);
@ -56,7 +63,7 @@ interface ITextMessage : IUnknown {
[propget] HRESULT longmsg_formatted([out, retval] BSTR *pVal);
[propput] HRESULT longmsg_formatted([in] BSTR newVal);
HRESULT add_attachment([in] SAFEARRAY(BYTE) data, [in, optional] BSTR mime_type, [in, optional] BSTR filename);
HRESULT add_attachment([in] SAFEARRAY(BYTE) data, [in] BSTR mime_type, [in] BSTR filename);
HRESULT has_attachments([out, retval] boolean *result);
HRESULT next_attachment([out] SAFEARRAY(BYTE) * data, [out] BSTR * mime_type, [out] BSTR * filename, [out, retval] boolean *result);
@ -92,6 +99,9 @@ interface ITextMessage : IUnknown {
[propget] HRESULT comments([out, retval] BSTR *pVal);
[propput] HRESULT comments([in] BSTR newVal);
[propget] HRESULT opt_fields([out, retval] SAFEARRAY(opt_field_t) *pVal);
[propput] HRESULT opt_fields([in] SAFEARRAY(opt_field_t) newVal);
};
[
@ -180,7 +190,7 @@ interface IpEpEngine : IUnknown {
pEp_ct_pEp = 0xff
} pEp_comm_type;
[uuid(CAAC4CFB-4EE6-4C27-81F7-E5B4E0A46816)] struct pEp_identity_s {
[uuid(0CB90E62-8A6A-4CA0-99D7-481704051FF0)] struct pEp_identity_s {
BSTR address;
BSTR fpr;
BSTR user_id;
@ -226,7 +236,7 @@ interface IpEpEngine : IUnknown {
pEp_rating_b0rken = -2
} pEp_color;
HRESULT encrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [in, optional] SAFEARRAY(BSTR) extra);
HRESULT encrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [in] SAFEARRAY(BSTR) extra);
HRESULT decrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [out] SAFEARRAY(BSTR) *keylist, [out, retval] pEp_color *rating);
HRESULT outgoing_message_color([in] ITextMessage *msg, [out, retval] pEp_color * pVal);
HRESULT identity_color([in] struct pEp_identity_s * ident, [out, retval] pEp_color * pVal);


+ 1
- 1
pEpCOMServerAdapter_i.c View File

@ -6,7 +6,7 @@
/* File created by MIDL compiler version 8.00.0603 */
/* at Tue May 12 13:50:45 2015
/* at Wed May 20 17:39:57 2015
*/
/* Compiler settings for pEpCOMServerAdapter.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603


+ 35
- 8
pEpCOMServerAdapter_i.h View File

@ -4,7 +4,7 @@
/* File created by MIDL compiler version 8.00.0603 */
/* at Tue May 12 13:50:45 2015
/* at Wed May 20 17:39:57 2015
*/
/* Compiler settings for pEpCOMServerAdapter.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603
@ -145,6 +145,13 @@ enum _pEp_enc_format
pEp_enc_pEp = ( pEp_enc_PGP_MIME + 1 )
} pEp_enc_format;
/* [uuid] */ struct DECLSPEC_UUID("1292C31A-6486-427F-B29F-7F03607836DC") _opt_field
{
BSTR name;
BSTR value;
} ;
typedef struct _opt_field opt_field_t;
EXTERN_C const IID IID_ITextMessage;
@ -186,8 +193,8 @@ EXTERN_C const IID IID_ITextMessage;
virtual HRESULT STDMETHODCALLTYPE add_attachment(
/* [in] */ SAFEARRAY * data,
/* [optional][in] */ BSTR mime_type,
/* [optional][in] */ BSTR filename) = 0;
/* [in] */ BSTR mime_type,
/* [in] */ BSTR filename) = 0;
virtual HRESULT STDMETHODCALLTYPE has_attachments(
/* [retval][out] */ boolean *result) = 0;
@ -264,6 +271,12 @@ EXTERN_C const IID IID_ITextMessage;
virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_comments(
/* [in] */ BSTR newVal) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_opt_fields(
/* [retval][out] */ SAFEARRAY * *pVal) = 0;
virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_opt_fields(
/* [in] */ SAFEARRAY * newVal) = 0;
};
@ -328,8 +341,8 @@ EXTERN_C const IID IID_ITextMessage;
HRESULT ( STDMETHODCALLTYPE *add_attachment )(
ITextMessage * This,
/* [in] */ SAFEARRAY * data,
/* [optional][in] */ BSTR mime_type,
/* [optional][in] */ BSTR filename);
/* [in] */ BSTR mime_type,
/* [in] */ BSTR filename);
HRESULT ( STDMETHODCALLTYPE *has_attachments )(
ITextMessage * This,
@ -430,6 +443,14 @@ EXTERN_C const IID IID_ITextMessage;
ITextMessage * This,
/* [in] */ BSTR newVal);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_opt_fields )(
ITextMessage * This,
/* [retval][out] */ SAFEARRAY * *pVal);
/* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_opt_fields )(
ITextMessage * This,
/* [in] */ SAFEARRAY * newVal);
END_INTERFACE
} ITextMessageVtbl;
@ -558,6 +579,12 @@ EXTERN_C const IID IID_ITextMessage;
#define ITextMessage_put_comments(This,newVal) \
( (This)->lpVtbl -> put_comments(This,newVal) )
#define ITextMessage_get_opt_fields(This,pVal) \
( (This)->lpVtbl -> get_opt_fields(This,pVal) )
#define ITextMessage_put_opt_fields(This,newVal) \
( (This)->lpVtbl -> put_opt_fields(This,newVal) )
#endif /* COBJMACROS */
@ -625,7 +652,7 @@ enum _pEp_comm_type
pEp_ct_pEp = 0xff
} pEp_comm_type;
/* [uuid] */ struct DECLSPEC_UUID("CAAC4CFB-4EE6-4C27-81F7-E5B4E0A46816") pEp_identity_s
/* [uuid] */ struct DECLSPEC_UUID("0CB90E62-8A6A-4CA0-99D7-481704051FF0") pEp_identity_s
{
BSTR address;
BSTR fpr;
@ -763,7 +790,7 @@ EXTERN_C const IID IID_IpEpEngine;
virtual HRESULT STDMETHODCALLTYPE encrypt_message(
/* [in] */ ITextMessage *src,
/* [out] */ ITextMessage **dst,
/* [optional][in] */ SAFEARRAY * extra) = 0;
/* [in] */ SAFEARRAY * extra) = 0;
virtual HRESULT STDMETHODCALLTYPE decrypt_message(
/* [in] */ ITextMessage *src,
@ -925,7 +952,7 @@ EXTERN_C const IID IID_IpEpEngine;
IpEpEngine * This,
/* [in] */ ITextMessage *src,
/* [out] */ ITextMessage **dst,
/* [optional][in] */ SAFEARRAY * extra);
/* [in] */ SAFEARRAY * extra);
HRESULT ( STDMETHODCALLTYPE *decrypt_message )(
IpEpEngine * This,


+ 1
- 0
stdafx.h View File

@ -40,3 +40,4 @@
#include "../../pEpEngine/src/pEpEngine.h"
#include "../../pEpEngine/src/keymanagement.h"
#include "../../pEpEngine/src/message_api.h"
#include "../../pEpEngine/src/stringpair.h"

Loading…
Cancel
Save