-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinteropstub.h
More file actions
70 lines (59 loc) · 2.45 KB
/
interopstub.h
File metadata and controls
70 lines (59 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
/*! \file interopstub.h
* Interop exports required by the DIRECT client.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*********************************************************************/
typedef bool (*Interop_ExecuteCallback)(void *user_ptr, const char *instance_id, const char *string);
typedef int32_t (*Interop_ReleaseInstanceCallback)(void **user_ptr);
typedef bool (*Interop_InvokeInstanceCallback)(void *user_ptr, echandle method_dictionary_handle,
echandle return_dictionary_handle);
typedef bool (*Interop_ProcessInstanceCallback)(void *user_ptr);
/*********************************************************************/
/*!
* Called when an instance is created
* \param type_name type of object to be created
* \param instance_id id of the object to be created
* \param max_instance_id maximum length of the instance id buffer
* \param execute_user_ptr user pointer stored with execute callback
* \param execute execute callback
* \param invoke_instance pointer to the instance invocation callback function
* \param release_instance pointer to the instance release/delete callback function
* \param process_instance pointer to the instance process callback function
* \param user_ptr pointer associated with instance id
* \return true on success, false otherwise
*/
bool Interop_CreateInstance(const char *type_name, char *instance_id, int32_t max_instance_id, void *execute_user_ptr,
Interop_ExecuteCallback execute, Interop_InvokeInstanceCallback *invoke_instance,
Interop_ReleaseInstanceCallback *release_instance,
Interop_ProcessInstanceCallback *process_instance, void **user_ptr);
/*!
* Set an interop function to override by key
* \param key identifier of option
* \param value pointer to the function
* \return true on success, false otherwise
*/
bool Interop_SetOverride(const char *key, void *value);
/*!
* Set an interop option by key
* \param key identifier of option
* \param value value of option
* \return true on success, false otherwise
*/
bool Interop_SetOption(const char *key, void *value);
/*!
* Loads interop functions
* \return true on success, false otherwise
*/
bool Interop_Load(void);
/*!
* Unloads interop functions
* \return true on success, false otherwise
*/
bool Interop_Unload(void);
/*********************************************************************/
#ifdef __cplusplus
}
#endif