(file) Return to Application.h CVS log (file) (dir) Up to [OMI] / omi / miapi

 1 krisbash 1.1 /*============================================================================
 2               * Copyright (C) Microsoft Corporation, All rights reserved. 
 3               *============================================================================
 4               */
 5              #ifndef _miapi_application_h_
 6              #define _miapi_application_h_
 7              
 8              #include "SafeHandle.h"
 9              #include "ChildList.h"
10              #include "ProtocolHandlerCache.h"
11              #include <MI.h>
12              
13              /* PUBLIC Application_NewGenericHandle
14               * Retrieve a new generic handler.  This is a generic version of MI_Application/MI_Session/etc.
15               * To recycle the handler back into the pool do this: 
16               *      ThunkHandle_Shutdown(genericHandle->thunkHandle);
17               * application - top-level application that the handle will be attached to
18               * handle - resultant handler
19               *
20               * Return code: MI_Result code
21               */
22 krisbash 1.1 MI_Result Application_NewGenericHandle(
23                  _Inout_ MI_Application *application, 
24                  _Out_ GenericHandle *handle);
25              
26              /* PUBLIC: Application_GetProtocolHandler
27               * Retrieve the MI_Application of a protocol handler.  If protocol handler
28               * is not loaded this function will load it.
29               * It is not valid to have destination and protocolHandler NULL.  It needs
30               * one to determine which handler to use.
31               *
32               * application - top-level application that the handler is attached to
33               * destination - For local this should be NULL or empty string.  If protocol
34               *               handler is NULL it will pick the default for local/remote 
35               *               destination.
36               * protocolHandler - If specified is the protocol handler string.
37               * protocolHnadlerApplication - MI_Application for the protocll handler
38               *               exposing the function table to the handler.
39               *
40               * Return code: MI_Result code
41               */
42              _Success_(return == MI_RESULT_OK)
43 krisbash 1.1 MI_Result Application_GetProtocolHandler(
44                  _In_ MI_Application *application, 
45                  _In_opt_z_ const MI_Char *destination, 
46                  _In_opt_z_ const MI_Char *protocolHandler, 
47                  _Outptr_ ProtocolHandlerCacheItem **protocolHandlerItem);
48              
49              MI_Result Application_RegisterSession(_Inout_ MI_Application *application, _Inout_ ChildListNode *session);
50              MI_Result Application_UnregisterSession(_Inout_ MI_Application *application, _Inout_ ChildListNode *session);
51              
52              MI_Result Application_RegisterHostedProvider(_Inout_ MI_Application *application, _Inout_ ChildListNode *hostedProvider);
53              MI_Result Application_UnregisterHostedProvider(_Inout_ MI_Application *application, _Inout_ ChildListNode *hostedProvider);
54              
55              
56              #define MIAPI_DEFAULT_LOCAL_PROTOCOL 1
57              #define MIAPI_DEFAULT_REMOTE_PROTOCOL 2
58              
59              _Success_(return == MI_RESULT_OK)
60              MI_EXTERN_C MI_Result Application_SetTestTransport(
61                  _Inout_ MI_Application *clientMiApplication, 
62                  _In_z_ const char *protocolHandlerName,
63                  _In_z_ const char *protocolHandlerDLL,
64 krisbash 1.1     _In_z_ const char *protocolHandlerDllEntryPoint,
65                  MI_Uint32 protocolHandlerMajorVersion,
66                  MI_Uint32 protocolHandlerMinorVersion,
67                  MI_Boolean overrideDefaultLocalTransport,
68                  MI_Boolean overrideDefaultRemoteTransport);
69              
70              #endif /* _miapi_application_h_ */
71              

ViewCVS 0.9.2