|
|
// -------------------------------------------------------------------------------- // SMIMEPOL.IDL // Copyright (c)1993-1998 Microsoft Corporation, All Rights Reserved // SMIME Policy definitions. // --------------------------------------------------------------------------------
import "ocidl.idl"; import "objidl.idl"; #ifndef UNIX import "propidl.idl"; #else import "urlmon.idl"; #endif /* unix */
import "mimeole.idl";
midl_pragma warning(disable:2139)
#ifdef SMIME_V3
// Forward declarations. interface ISMIMEPolicySimpleEdit; interface ISMIMEPolicyFullEdit; interface ISMIMEPolicyCheckAccess; interface ISMIMEPolicyLabelInfo; interface ISMIMEPolicyValidateSend;
// Comments cpp_quote("//--------------------------------------------------------------------------------") cpp_quote("// SMIMEPOL.H") cpp_quote("//--------------------------------------------------------------------------------") cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.") cpp_quote("//") cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF") cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO") cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A") cpp_quote("// PARTICULAR PURPOSE.") cpp_quote("//--------------------------------------------------------------------------------") cpp_quote("") cpp_quote("#pragma comment(lib,\"uuid.lib\")") cpp_quote("")
// Guids cpp_quote("// --------------------------------------------------------------------------------") cpp_quote("// GUIDS") cpp_quote("// --------------------------------------------------------------------------------") cpp_quote("// {5073B6B4-AA66-11d2-9841-0060B0EC2DF3}") cpp_quote("DEFINE_GUID(IID_ISMimePolicySimpleEdit, 0x5073b6b4, 0xaa66, 0x11d2, 0x98, 0x41, 0x0, 0x60, 0xb0, 0xec, 0x2d, 0xf3);") cpp_quote("") cpp_quote("// {5073B6B5-AA66-11d2-9841-0060B0EC2DF3}") cpp_quote("DEFINE_GUID(IID_ISMimePolicyFullEdit, 0x5073b6b5, 0xaa66, 0x11d2, 0x98, 0x41, 0x0, 0x60, 0xb0, 0xec, 0x2d, 0xf3);") cpp_quote("") cpp_quote("// {5073B6B6-AA66-11d2-9841-0060B0EC2DF3}") cpp_quote("DEFINE_GUID(IID_ISMimePolicyCheckAccess, 0x5073b6b6, 0xaa66, 0x11d2, 0x98, 0x41, 0x0, 0x60, 0xb0, 0xec, 0x2d, 0xf3);") cpp_quote("") cpp_quote("// {5073B6B7-AA66-11d2-9841-0060B0EC2DF3}") cpp_quote("DEFINE_GUID(IID_ISMimePolicyLabelInfo, 0x5073b6b7, 0xaa66, 0x11d2, 0x98, 0x41, 0x0, 0x60, 0xb0, 0xec, 0x2d, 0xf3);") cpp_quote("") cpp_quote("// {5073B6B8-AA66-11d2-9841-0060B0EC2DF3}") cpp_quote("DEFINE_GUID(IID_ISMimePolicyValidateSend, 0x5073b6b8, 0xaa66, 0x11d2, 0x98, 0x41, 0x0, 0x60, 0xb0, 0xec, 0x2d, 0xf3);") cpp_quote("")
// Typedefs. cpp_quote("// Typedefs") cpp_quote("#ifndef LPBYTE") cpp_quote("typedef BYTE *LPBYTE;") cpp_quote("#endif") cpp_quote("")
// // Common Defines // cpp_quote("// --------------------------------------------------------------------------------") cpp_quote("// Common Macros") cpp_quote("// --------------------------------------------------------------------------------") cpp_quote("") cpp_quote("// PolicyFlags.") cpp_quote("#define SMIME_POLICY_MODULE_SUPPORTS_ADV_CONFIG 0x00000001") cpp_quote("#define SMIME_POLICY_MODULE_FORCE_ENCRYPTION 0x00000002") cpp_quote("#define SMIME_POLICY_MODULE_VALIDATE_RECIPIENT 0x00000004") cpp_quote("#define SMIME_POLICY_MODULE_VALIDATE_SENDER 0x00000008") cpp_quote("#define SMIME_POLICY_MODULE_PRIVACYMARK_READONLY 0x00000010") cpp_quote("") cpp_quote("// Common Flags.") cpp_quote("#define SMIME_POLICY_MODULE_NOUI 0x00000001") cpp_quote("#define SMIME_POLICY_MODULE_NOEDIT 0x00000002")
// --------------------------------------------------------------------------------------- // ISMimePolicySimpleEdit - Used for simple editing of security label properties. // --------------------------------------------------------------------------------------- [ uuid(5073B6B4-AA66-11d2-9841-0060B0EC2DF3), local, helpstring("ISMimePolicySimpleEdit"), ] interface ISMimePolicySimpleEdit : IUnknown { typedef [unique] ISMimePolicySimpleEdit *LPSMIMEPOLICYSIMPLEEDIT;
HRESULT GetPolicyInfo( [in] DWORD dwFlags, [out] DWORD *pdwPolicyFlags);
HRESULT GetClassifications( [in] DWORD dwFlags, [out] DWORD *pcClassifications, [out] LPWSTR **rgwszClassifications, [out] LPDWORD *rgdwClassifications, [out] DWORD *pdwDefault);
HRESULT GetDefaultPolicyInfo( [in] DWORD dwFlags, [out] DWORD *pdwClassification, // default classification [out] LPWSTR *pwszPrivaryMark);
HRESULT IsLabelValid( [in] DWORD dwFlags, [in] HWND hwndParent, [in,out] PSMIME_SECURITY_LABEL *pplabel); }
// --------------------------------------------------------------------------------------- // ISMimePolicyFullEdit - Used for full editing of security label properties. // --------------------------------------------------------------------------------------- [ uuid(5073B6B5-AA66-11d2-9841-0060B0EC2DF3), local, helpstring("ISMimePolicyFullEdit"), ] interface ISMimePolicyFullEdit : ISMimePolicySimpleEdit { typedef [unique] ISMimePolicyFullEdit *LPSMIMEPOLICYFULLEDIT;
HRESULT DoAdvancedEdit( [in] DWORD dwFlags, [in] HWND hwndParent, [in,out] PSMIME_SECURITY_LABEL *pplabel);
HRESULT IsLabelValidAdvanced( [in] DWORD dwFlags, [in] HWND hwndParent, [in,out] PSMIME_SECURITY_LABEL *pplabel); }
// --------------------------------------------------------------------------------------- // ISMimePolicyCheckAccess - Used for checking if access should be granted to the message. // --------------------------------------------------------------------------------------- [ uuid(5073B6B6-AA66-11d2-9841-0060B0EC2DF3), local, helpstring("ISMimePolicyCheckAccess"), ] interface ISMimePolicyCheckAccess : IUnknown { typedef [unique] ISMimePolicyCheckAccess *LPSMIMEPOLICYCHECKACCESS;
HRESULT IsAccessGranted( [in] DWORD dwFlags, [in] HWND hwndParent, [in] const PSMIME_SECURITY_LABEL plabel, [in] const PCCERT_CONTEXT pccertDecrypt, /*optional*/ [in] const PCCERT_CONTEXT pccertSign, [in] const HCERTSTORE hcertstor /*optional*/ ); }
// --------------------------------------------------------------------------------------- // IID_ISMimePolicyLabelInfo - Used for getting label info and displaying adv properties. // --------------------------------------------------------------------------------------- [ uuid(5073B6B7-AA66-11d2-9841-0060B0EC2DF3), local, helpstring("ISMimePolicyLabelInfo"), ] interface ISMimePolicyLabelInfo : IUnknown { typedef [unique] ISMimePolicyLabelInfo *LPSMIMEPOLICYLABELINFO;
HRESULT GetLabelAsStrings( [in] DWORD dwFlags, [in] const PSMIME_SECURITY_LABEL plabel, [out] LPWSTR *pwszPolicyName, [out] LPWSTR *pwszClassification, [out] LPWSTR *pwszPrivacyMark, [out] LPWSTR *pwszCategory);
HRESULT GetStringizedLabel( [in] DWORD dwFlags, [in] const PSMIME_SECURITY_LABEL plabel, [out] LPWSTR *pwszLabel); HRESULT DisplayAdvancedLabelProperties( [in] DWORD dwFlags, [in] HWND hwndParent, [in] const PSMIME_SECURITY_LABEL plabel); }
// --------------------------------------------------------------------------------------- // IID_ISMimePolicyValidateSend - Used for validation at send time. // --------------------------------------------------------------------------------------- [ uuid(5073B6B8-AA66-11d2-9841-0060B0EC2DF3), local, helpstring("ISMimePolicyLabelInfo"), ] interface ISMimePolicyValidateSend : IUnknown { typedef [unique] ISMimePolicyValidateSend *LPSMIMEPOLICYVALIDATESEND;
HRESULT IsValidLabelSignerCert( [in] DWORD dwFlags, [in] HWND hwndParent, [in] const PSMIME_SECURITY_LABEL plabel, [in] const PCCERT_CONTEXT pccertSigner);
HRESULT IsValidLabelRecipientCert( [in] DWORD dwFlags, [in] HWND hwndParent, [in] const PSMIME_SECURITY_LABEL plabel, [in] const PCCERT_CONTEXT pccertRecipient); }
cpp_quote("typedef HRESULT (*PFNGetSMimePolicy) (") cpp_quote(" /* in */ DWORD dwFlags,") cpp_quote(" /* in */ LPSTR szObjIdSecurityPolicy,") cpp_quote(" /* in */ LCID lcid,") cpp_quote(" /* in */ REFIID riid,") cpp_quote(" /* out */ LPUNKNOWN *ppUnk);") cpp_quote("")
cpp_quote("// Macros for the memfree/alloc used by the policy module. ") cpp_quote("#define SecPolicyAlloc(cb) GlobalAlloc(GPTR, (cb)) ") cpp_quote("#define SecPolicyFree(hMem) if (hMem) { GlobalFree(hMem); hMem = NULL; } ")
cpp_quote(" // Other useful macros ") cpp_quote("#define MAX_OID_LENGTH MAX_PATH ") cpp_quote("#define MAX_POLICY_NAME MAX_PATH ") cpp_quote("#define MAX_FUNC_NAME MAX_PATH ") cpp_quote("// Don't use classification and privacy strings larger than this # of chars. ") cpp_quote("#define MAX_PRIVACYMARK_LENGTH MAX_PATH ")
#endif // SMIME_V3
|