2 * Copyright (c) 1999-2001,2004 Apple Computer, Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
23 * emmspi.h -- Service Provider Interface for Elective Module Managers
29 #include <Security/cssmtype.h>
35 typedef struct cssm_state_funcs
{
36 CSSM_RETURN (CSSMAPI
*cssm_GetAttachFunctions
)
37 (CSSM_MODULE_HANDLE hAddIn
,
38 CSSM_SERVICE_MASK AddinType
,
41 CSSM_BOOL
*Serialized
);
42 CSSM_RETURN (CSSMAPI
*cssm_ReleaseAttachFunctions
)
43 (CSSM_MODULE_HANDLE hAddIn
);
44 CSSM_RETURN (CSSMAPI
*cssm_GetAppMemoryFunctions
)
45 (CSSM_MODULE_HANDLE hAddIn
,
46 CSSM_UPCALLS_PTR UpcallTable
);
47 CSSM_RETURN (CSSMAPI
*cssm_IsFuncCallValid
)
48 (CSSM_MODULE_HANDLE hAddin
,
49 CSSM_PROC_ADDR SrcAddress
,
50 CSSM_PROC_ADDR DestAddress
,
51 CSSM_PRIVILEGE InPriv
,
52 CSSM_PRIVILEGE
*OutPriv
,
55 CSSM_RETURN (CSSMAPI
*cssm_DeregisterManagerServices
)
56 (const CSSM_GUID
*GUID
);
57 CSSM_RETURN (CSSMAPI
*cssm_DeliverModuleManagerEvent
)
58 (const CSSM_MANAGER_EVENT_NOTIFICATION
*EventDescription
);
59 } CSSM_STATE_FUNCS DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_STATE_FUNCS_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
61 typedef struct cssm_manager_registration_info
{
62 /* loading, unloading, dispatch table, and event notification */
63 CSSM_RETURN (CSSMAPI
*Initialize
)
66 CSSM_RETURN (CSSMAPI
*Terminate
) (void);
67 CSSM_RETURN (CSSMAPI
*RegisterDispatchTable
)
68 (CSSM_STATE_FUNCS_PTR CssmStateCallTable
);
69 CSSM_RETURN (CSSMAPI
*DeregisterDispatchTable
) (void);
70 CSSM_RETURN (CSSMAPI
*EventNotifyManager
)
71 (const CSSM_MANAGER_EVENT_NOTIFICATION
*EventDescription
);
72 CSSM_RETURN (CSSMAPI
*RefreshFunctionTable
)
73 (CSSM_FUNC_NAME_ADDR_PTR FuncNameAddrPtr
,
74 uint32 NumOfFuncNameAddr
);
75 } CSSM_MANAGER_REGISTRATION_INFO DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_MANAGER_REGISTRATION_INFO_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
79 CSSM_HINT_ADDRESS_APP
= 1 << 0,
80 CSSM_HINT_ADDRESS_SP
= 1 << 1
84 ModuleManagerAuthenticate (CSSM_KEY_HIERARCHY KeyHierarchy
,
85 const CSSM_GUID
*CssmGuid
,
86 const CSSM_GUID
*AppGuid
,
87 CSSM_MANAGER_REGISTRATION_INFO_PTR FunctionTable
)
88 DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
94 #endif /* _EMMSPI_H_ */