Sorting source tree a bit
[tpg/acess2.git] / KernelLand / Modules / Interfaces / UDI / include / udi / imc.h
1 /**
2  * \file udi_imc.h
3  * \brief Inter-Module Communication
4  */
5 #ifndef _UDI_IMC_H_
6 #define _UDI_IMC_H_
7
8 typedef void udi_channel_anchor_call_t(udi_cb_t *gcb, udi_channel_t anchored_channel);
9 typedef void udi_channel_spawn_call_t(udi_cb_t *gcb, udi_channel_t new_channel);
10
11 typedef struct udi_channel_event_cb_s   udi_channel_event_cb_t;
12
13 typedef void udi_channel_event_ind_op_t(udi_channel_event_cb_t *cb);
14
15 /**
16  * \brief Anchors a channel end to the current region
17  */
18 extern void udi_channel_anchor(
19         udi_channel_anchor_call_t *callback, udi_cb_t *gcb,
20         udi_channel_t channel, udi_index_t ops_idx, void *channel_context
21         );
22
23 /**
24  * \brief Created a new channel between two regions
25  */
26 extern void udi_channel_spawn(
27         udi_channel_spawn_call_t *callback,
28         udi_cb_t *gcb,
29         udi_channel_t channel,
30         udi_index_t spawn_idx,
31         udi_index_t ops_idx,
32         void *channel_context
33         );
34
35 /**
36  * \brief Attaches a new context pointer to the current channel
37  */
38 extern void udi_channel_set_context(
39         udi_channel_t target_channel,
40         void *channel_context
41         );
42 /**
43  * \brief 
44  */
45 extern void udi_channel_op_abort(
46         udi_channel_t target_channel,
47         udi_cb_t *orig_cb
48         );
49
50 /**
51  * \brief Closes an open channel
52  */
53 extern void udi_channel_close(udi_channel_t channel);
54
55 /**
56  * \brief Describes a channel event
57  */
58 struct udi_channel_event_cb_s
59 {
60         udi_cb_t gcb;
61         udi_ubit8_t event;
62         union {
63                 struct {
64                         udi_cb_t *bind_cb;
65                 } internal_bound;
66                 struct {
67                         udi_cb_t *bind_cb;
68                         udi_ubit8_t parent_ID;
69                         udi_buf_path_t *path_handles;
70                 } parent_bound;
71                 udi_cb_t *orig_cb;
72         }       params;
73 };
74 /* Channel event types */
75 #define UDI_CHANNEL_CLOSED                0
76 #define UDI_CHANNEL_BOUND                 1
77 #define UDI_CHANNEL_OP_ABORTED            2
78
79 /**
80  * \brief Proxy function 
81  */
82 extern void udi_channel_event_ind(udi_channel_event_cb_t *cb);
83
84 /**
85  * \brief Called when channel event is completed
86  */
87 extern void udi_channel_event_complete(
88         udi_channel_event_cb_t *cb, udi_status_t status
89         );
90
91
92 #endif

UCC git Repository :: git.ucc.asn.au