runtime config of engine
authorVolker Birk <vb@pep-project.org>
Mon, 22 Feb 2016 14:41:35 +0100
changeset 60a91c51e4f42b
parent 59 c03abab41702
child 61 d5bf2b6538f8
runtime config of engine
CpEpEngine.cpp
CpEpEngine.h
pEpCOMServerAdapter.idl
     1.1 --- a/CpEpEngine.cpp	Sun Feb 21 23:24:31 2016 +0100
     1.2 +++ b/CpEpEngine.cpp	Mon Feb 22 14:41:35 2016 +0100
     1.3 @@ -27,7 +27,19 @@
     1.4  
     1.5  STDMETHODIMP CpEpEngine::verbose_logging(BOOL enable)
     1.6  {
     1.7 -    verbose_mode = enable != 0;
     1.8 +    verbose_mode = enable != FALSE;
     1.9 +    return S_OK;
    1.10 +}
    1.11 +
    1.12 +STDMETHODIMP CpEpEngine::passive_mode(BOOL enable)
    1.13 +{
    1.14 +    ::config_passive_mode(get_session(), enable != FALSE);
    1.15 +    return S_OK;
    1.16 +}
    1.17 +
    1.18 +STDMETHODIMP CpEpEngine::unencrypted_subject(BOOL enable)
    1.19 +{
    1.20 +    ::config_unencrypted_subject(get_session(), enable != FALSE);
    1.21      return S_OK;
    1.22  }
    1.23  
     2.1 --- a/CpEpEngine.h	Sun Feb 21 23:24:31 2016 +0100
     2.2 +++ b/CpEpEngine.h	Mon Feb 22 14:41:35 2016 +0100
     2.3 @@ -126,7 +126,16 @@
     2.4      bool verbose_mode;
     2.5  
     2.6  public:
     2.7 +    // runtime config of the adapter
     2.8 +
     2.9      STDMETHOD(verbose_logging)(BOOL enable);
    2.10 +    
    2.11 +    // runtime config of the engine
    2.12 +
    2.13 +    STDMETHOD(passive_mode)(BOOL enable);
    2.14 +    STDMETHOD(unencrypted_subject)(BOOL enable);
    2.15 +
    2.16 +    // basic API
    2.17  
    2.18      STDMETHOD(log)(BSTR title, BSTR entity, BSTR description, BSTR comment);
    2.19      STDMETHOD(decrypt)(BSTR ctext, BSTR * ptext, LPSAFEARRAY * key_list, pEp_STATUS * decrypt_status);
     3.1 --- a/pEpCOMServerAdapter.idl	Sun Feb 21 23:24:31 2016 +0100
     3.2 +++ b/pEpCOMServerAdapter.idl	Mon Feb 22 14:41:35 2016 +0100
     3.3 @@ -15,9 +15,18 @@
     3.4      pointer_default(unique)
     3.5  ]
     3.6  interface IpEpEngine : IUnknown {
     3.7 +    // runtime config of the adapter
     3.8 +
     3.9      HRESULT verbose_logging([in] BOOL enable);
    3.10  
    3.11 -    typedef   enum _pEp_STATUS {
    3.12 +    // runtime config of the engine
    3.13 +
    3.14 +    HRESULT passive_mode([in] BOOL enable);
    3.15 +    HRESULT unencrypted_subject([in] BOOL enable);
    3.16 +
    3.17 +    // basic API
    3.18 +
    3.19 +    typedef enum _pEp_STATUS {
    3.20          pEp_STATUS_OK = 0,
    3.21  
    3.22          pEp_KEY_NOT_FOUND = 0x0201,