TextMessage concept
authorVolker Birk <vb@pep-project.org>
Tue, 28 Apr 2015 15:30:12 +0200
changeset 122f0ba9d79082
parent 11 76a1b3bfc78f
child 13 d83d94f11e62
TextMessage concept
CpEpEngine.cpp
CpEpEngine.h
TextMessage.h
pEpCOMServerAdapter.idl
pEpCOMServerAdapter.rc
pEpCOMServerAdapter_i.c
pEpCOMServerAdapter_i.h
     1.1 --- a/CpEpEngine.cpp	Fri Apr 24 20:27:18 2015 +0200
     1.2 +++ b/CpEpEngine.cpp	Tue Apr 28 15:30:12 2015 +0200
     1.3 @@ -2,6 +2,7 @@
     1.4  
     1.5  #include "stdafx.h"
     1.6  #include "CpEpEngine.h"
     1.7 +#include "TextMessage.h"
     1.8  
     1.9  using namespace std;
    1.10  using namespace pEp::utility;
     2.1 --- a/CpEpEngine.h	Fri Apr 24 20:27:18 2015 +0200
     2.2 +++ b/CpEpEngine.h	Tue Apr 28 15:30:12 2015 +0200
     2.3 @@ -145,6 +145,9 @@
     2.4      STDMETHOD(myself)(struct pEp_identity_s *ident, struct pEp_identity_s *result);
     2.5      STDMETHOD(update_identity)(struct pEp_identity_s *ident, struct pEp_identity_s *result);
     2.6      STDMETHOD(key_compromized)(BSTR fpr);
     2.7 +    
     2.8 +    // Message API
     2.9 +
    2.10  };
    2.11  
    2.12  OBJECT_ENTRY_AUTO(__uuidof(pEpEngine), CpEpEngine)
     3.1 --- a/TextMessage.h	Fri Apr 24 20:27:18 2015 +0200
     3.2 +++ b/TextMessage.h	Tue Apr 28 15:30:12 2015 +0200
     3.3 @@ -62,6 +62,7 @@
     3.4  
     3.5  DECLARE_REGISTRY_RESOURCEID(IDR_TEXTMESSAGE)
     3.6  
     3.7 +DECLARE_NOT_AGGREGATABLE(CTextMessage)
     3.8  
     3.9  BEGIN_COM_MAP(CTextMessage)
    3.10  	COM_INTERFACE_ENTRY(ITextMessage)
     4.1 --- a/pEpCOMServerAdapter.idl	Fri Apr 24 20:27:18 2015 +0200
     4.2 +++ b/pEpCOMServerAdapter.idl	Tue Apr 28 15:30:12 2015 +0200
     4.3 @@ -122,6 +122,20 @@
     4.4      HRESULT key_compromized([in] BSTR fpr);
     4.5  };
     4.6  
     4.7 +
     4.8 +[
     4.9 +    object,
    4.10 +    uuid(161538F9-53C8-4D9C-8BA4-0FB43AEC7106),
    4.11 +    oleautomation,
    4.12 +    nonextensible,
    4.13 +    pointer_default(unique)
    4.14 +]
    4.15 +interface ITextMessage : IUnknown {
    4.16 +
    4.17 +    [propget] HRESULT from([out, retval] struct pEp_identity_s* pVal);
    4.18 +    [propput] HRESULT from([in] struct pEp_identity_s *newVal);
    4.19 +};
    4.20 +
    4.21  [
    4.22      object,
    4.23      uuid(BC9AB54D-2CDA-47A5-AB40-64857B9E9555),
    4.24 @@ -157,19 +171,6 @@
    4.25  };
    4.26  
    4.27  [
    4.28 -	object,
    4.29 -	uuid(161538F9-53C8-4D9C-8BA4-0FB43AEC7106),
    4.30 -	oleautomation,
    4.31 -	nonextensible,
    4.32 -	pointer_default(unique)
    4.33 -]
    4.34 -interface ITextMessage : IUnknown {
    4.35 -
    4.36 -    [propget] HRESULT from([out, retval] struct pEp_identity_s* pVal);
    4.37 -    [propput] HRESULT from([in] struct pEp_identity_s *newVal);
    4.38 -};
    4.39 -
    4.40 -[
    4.41      uuid(3EC2E1A4-40E8-48E4-A7B0-1876D34F9462),
    4.42      version(1.0),
    4.43  ]
     5.1 Binary file pEpCOMServerAdapter.rc has changed
     6.1 --- a/pEpCOMServerAdapter_i.c	Fri Apr 24 20:27:18 2015 +0200
     6.2 +++ b/pEpCOMServerAdapter_i.c	Tue Apr 28 15:30:12 2015 +0200
     6.3 @@ -6,7 +6,7 @@
     6.4  
     6.5  
     6.6   /* File created by MIDL compiler version 8.00.0603 */
     6.7 -/* at Fri Apr 24 16:11:40 2015
     6.8 +/* at Tue Apr 28 15:22:51 2015
     6.9   */
    6.10  /* Compiler settings for pEpCOMServerAdapter.idl:
    6.11      Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603 
    6.12 @@ -70,12 +70,12 @@
    6.13  MIDL_DEFINE_GUID(IID, IID_IpEpEngine,0x9A9F4422,0xCF0A,0x45D7,0x90,0xCD,0x1D,0x1B,0x7B,0x2A,0x45,0x40);
    6.14  
    6.15  
    6.16 +MIDL_DEFINE_GUID(IID, IID_ITextMessage,0x161538F9,0x53C8,0x4D9C,0x8B,0xA4,0x0F,0xB4,0x3A,0xEC,0x71,0x06);
    6.17 +
    6.18 +
    6.19  MIDL_DEFINE_GUID(IID, IID_IMessageAPI_Outlook,0xBC9AB54D,0x2CDA,0x47A5,0xAB,0x40,0x64,0x85,0x7B,0x9E,0x95,0x55);
    6.20  
    6.21  
    6.22 -MIDL_DEFINE_GUID(IID, IID_ITextMessage,0x161538F9,0x53C8,0x4D9C,0x8B,0xA4,0x0F,0xB4,0x3A,0xEC,0x71,0x06);
    6.23 -
    6.24 -
    6.25  MIDL_DEFINE_GUID(IID, LIBID_pEpCOMServerAdapterLib,0x3EC2E1A4,0x40E8,0x48E4,0xA7,0xB0,0x18,0x76,0xD3,0x4F,0x94,0x62);
    6.26  
    6.27  
     7.1 --- a/pEpCOMServerAdapter_i.h	Fri Apr 24 20:27:18 2015 +0200
     7.2 +++ b/pEpCOMServerAdapter_i.h	Tue Apr 28 15:30:12 2015 +0200
     7.3 @@ -4,7 +4,7 @@
     7.4  
     7.5  
     7.6   /* File created by MIDL compiler version 8.00.0603 */
     7.7 -/* at Fri Apr 24 16:11:40 2015
     7.8 +/* at Tue Apr 28 15:22:51 2015
     7.9   */
    7.10  /* Compiler settings for pEpCOMServerAdapter.idl:
    7.11      Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603 
    7.12 @@ -52,6 +52,13 @@
    7.13  #endif 	/* __IpEpEngine_FWD_DEFINED__ */
    7.14  
    7.15  
    7.16 +#ifndef __ITextMessage_FWD_DEFINED__
    7.17 +#define __ITextMessage_FWD_DEFINED__
    7.18 +typedef interface ITextMessage ITextMessage;
    7.19 +
    7.20 +#endif 	/* __ITextMessage_FWD_DEFINED__ */
    7.21 +
    7.22 +
    7.23  #ifndef __IMessageAPI_Outlook_FWD_DEFINED__
    7.24  #define __IMessageAPI_Outlook_FWD_DEFINED__
    7.25  typedef interface IMessageAPI_Outlook IMessageAPI_Outlook;
    7.26 @@ -59,13 +66,6 @@
    7.27  #endif 	/* __IMessageAPI_Outlook_FWD_DEFINED__ */
    7.28  
    7.29  
    7.30 -#ifndef __ITextMessage_FWD_DEFINED__
    7.31 -#define __ITextMessage_FWD_DEFINED__
    7.32 -typedef interface ITextMessage ITextMessage;
    7.33 -
    7.34 -#endif 	/* __ITextMessage_FWD_DEFINED__ */
    7.35 -
    7.36 -
    7.37  #ifndef ___IpEpEngineEvents_FWD_DEFINED__
    7.38  #define ___IpEpEngineEvents_FWD_DEFINED__
    7.39  typedef interface _IpEpEngineEvents _IpEpEngineEvents;
    7.40 @@ -539,6 +539,96 @@
    7.41  #endif 	/* __IpEpEngine_INTERFACE_DEFINED__ */
    7.42  
    7.43  
    7.44 +#ifndef __ITextMessage_INTERFACE_DEFINED__
    7.45 +#define __ITextMessage_INTERFACE_DEFINED__
    7.46 +
    7.47 +/* interface ITextMessage */
    7.48 +/* [unique][nonextensible][oleautomation][uuid][object] */ 
    7.49 +
    7.50 +
    7.51 +EXTERN_C const IID IID_ITextMessage;
    7.52 +
    7.53 +#if defined(__cplusplus) && !defined(CINTERFACE)
    7.54 +    
    7.55 +    MIDL_INTERFACE("161538F9-53C8-4D9C-8BA4-0FB43AEC7106")
    7.56 +    ITextMessage : public IUnknown
    7.57 +    {
    7.58 +    public:
    7.59 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_from( 
    7.60 +            /* [retval][out] */ struct pEp_identity_s *pVal) = 0;
    7.61 +        
    7.62 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_from( 
    7.63 +            /* [in] */ struct pEp_identity_s *newVal) = 0;
    7.64 +        
    7.65 +    };
    7.66 +    
    7.67 +    
    7.68 +#else 	/* C style interface */
    7.69 +
    7.70 +    typedef struct ITextMessageVtbl
    7.71 +    {
    7.72 +        BEGIN_INTERFACE
    7.73 +        
    7.74 +        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
    7.75 +            ITextMessage * This,
    7.76 +            /* [in] */ REFIID riid,
    7.77 +            /* [annotation][iid_is][out] */ 
    7.78 +            _COM_Outptr_  void **ppvObject);
    7.79 +        
    7.80 +        ULONG ( STDMETHODCALLTYPE *AddRef )( 
    7.81 +            ITextMessage * This);
    7.82 +        
    7.83 +        ULONG ( STDMETHODCALLTYPE *Release )( 
    7.84 +            ITextMessage * This);
    7.85 +        
    7.86 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_from )( 
    7.87 +            ITextMessage * This,
    7.88 +            /* [retval][out] */ struct pEp_identity_s *pVal);
    7.89 +        
    7.90 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_from )( 
    7.91 +            ITextMessage * This,
    7.92 +            /* [in] */ struct pEp_identity_s *newVal);
    7.93 +        
    7.94 +        END_INTERFACE
    7.95 +    } ITextMessageVtbl;
    7.96 +
    7.97 +    interface ITextMessage
    7.98 +    {
    7.99 +        CONST_VTBL struct ITextMessageVtbl *lpVtbl;
   7.100 +    };
   7.101 +
   7.102 +    
   7.103 +
   7.104 +#ifdef COBJMACROS
   7.105 +
   7.106 +
   7.107 +#define ITextMessage_QueryInterface(This,riid,ppvObject)	\
   7.108 +    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
   7.109 +
   7.110 +#define ITextMessage_AddRef(This)	\
   7.111 +    ( (This)->lpVtbl -> AddRef(This) ) 
   7.112 +
   7.113 +#define ITextMessage_Release(This)	\
   7.114 +    ( (This)->lpVtbl -> Release(This) ) 
   7.115 +
   7.116 +
   7.117 +#define ITextMessage_get_from(This,pVal)	\
   7.118 +    ( (This)->lpVtbl -> get_from(This,pVal) ) 
   7.119 +
   7.120 +#define ITextMessage_put_from(This,newVal)	\
   7.121 +    ( (This)->lpVtbl -> put_from(This,newVal) ) 
   7.122 +
   7.123 +#endif /* COBJMACROS */
   7.124 +
   7.125 +
   7.126 +#endif 	/* C style interface */
   7.127 +
   7.128 +
   7.129 +
   7.130 +
   7.131 +#endif 	/* __ITextMessage_INTERFACE_DEFINED__ */
   7.132 +
   7.133 +
   7.134  #ifndef __IMessageAPI_Outlook_INTERFACE_DEFINED__
   7.135  #define __IMessageAPI_Outlook_INTERFACE_DEFINED__
   7.136  
   7.137 @@ -642,96 +732,6 @@
   7.138  #endif 	/* __IMessageAPI_Outlook_INTERFACE_DEFINED__ */
   7.139  
   7.140  
   7.141 -#ifndef __ITextMessage_INTERFACE_DEFINED__
   7.142 -#define __ITextMessage_INTERFACE_DEFINED__
   7.143 -
   7.144 -/* interface ITextMessage */
   7.145 -/* [unique][nonextensible][oleautomation][uuid][object] */ 
   7.146 -
   7.147 -
   7.148 -EXTERN_C const IID IID_ITextMessage;
   7.149 -
   7.150 -#if defined(__cplusplus) && !defined(CINTERFACE)
   7.151 -    
   7.152 -    MIDL_INTERFACE("161538F9-53C8-4D9C-8BA4-0FB43AEC7106")
   7.153 -    ITextMessage : public IUnknown
   7.154 -    {
   7.155 -    public:
   7.156 -        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_from( 
   7.157 -            /* [retval][out] */ struct pEp_identity_s *pVal) = 0;
   7.158 -        
   7.159 -        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_from( 
   7.160 -            /* [in] */ struct pEp_identity_s *newVal) = 0;
   7.161 -        
   7.162 -    };
   7.163 -    
   7.164 -    
   7.165 -#else 	/* C style interface */
   7.166 -
   7.167 -    typedef struct ITextMessageVtbl
   7.168 -    {
   7.169 -        BEGIN_INTERFACE
   7.170 -        
   7.171 -        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
   7.172 -            ITextMessage * This,
   7.173 -            /* [in] */ REFIID riid,
   7.174 -            /* [annotation][iid_is][out] */ 
   7.175 -            _COM_Outptr_  void **ppvObject);
   7.176 -        
   7.177 -        ULONG ( STDMETHODCALLTYPE *AddRef )( 
   7.178 -            ITextMessage * This);
   7.179 -        
   7.180 -        ULONG ( STDMETHODCALLTYPE *Release )( 
   7.181 -            ITextMessage * This);
   7.182 -        
   7.183 -        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_from )( 
   7.184 -            ITextMessage * This,
   7.185 -            /* [retval][out] */ struct pEp_identity_s *pVal);
   7.186 -        
   7.187 -        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_from )( 
   7.188 -            ITextMessage * This,
   7.189 -            /* [in] */ struct pEp_identity_s *newVal);
   7.190 -        
   7.191 -        END_INTERFACE
   7.192 -    } ITextMessageVtbl;
   7.193 -
   7.194 -    interface ITextMessage
   7.195 -    {
   7.196 -        CONST_VTBL struct ITextMessageVtbl *lpVtbl;
   7.197 -    };
   7.198 -
   7.199 -    
   7.200 -
   7.201 -#ifdef COBJMACROS
   7.202 -
   7.203 -
   7.204 -#define ITextMessage_QueryInterface(This,riid,ppvObject)	\
   7.205 -    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
   7.206 -
   7.207 -#define ITextMessage_AddRef(This)	\
   7.208 -    ( (This)->lpVtbl -> AddRef(This) ) 
   7.209 -
   7.210 -#define ITextMessage_Release(This)	\
   7.211 -    ( (This)->lpVtbl -> Release(This) ) 
   7.212 -
   7.213 -
   7.214 -#define ITextMessage_get_from(This,pVal)	\
   7.215 -    ( (This)->lpVtbl -> get_from(This,pVal) ) 
   7.216 -
   7.217 -#define ITextMessage_put_from(This,newVal)	\
   7.218 -    ( (This)->lpVtbl -> put_from(This,newVal) ) 
   7.219 -
   7.220 -#endif /* COBJMACROS */
   7.221 -
   7.222 -
   7.223 -#endif 	/* C style interface */
   7.224 -
   7.225 -
   7.226 -
   7.227 -
   7.228 -#endif 	/* __ITextMessage_INTERFACE_DEFINED__ */
   7.229 -
   7.230 -
   7.231  
   7.232  #ifndef __pEpCOMServerAdapterLib_LIBRARY_DEFINED__
   7.233  #define __pEpCOMServerAdapterLib_LIBRARY_DEFINED__