• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/avahi-0.6.31/avahi-compat-howl/include/corby/
1#ifndef _corby_orb_h
2#define _corby_orb_h
3
4/*
5 * Copyright 2003, 2004 Porchdog Software. All rights reserved.
6 *
7 *	Redistribution and use in source and binary forms, with or without modification,
8 *	are permitted provided that the following conditions are met:
9 *
10 *		1. Redistributions of source code must retain the above copyright notice,
11 *		   this list of conditions and the following disclaimer.
12 *		2. Redistributions in binary form must reproduce the above copyright notice,
13 *		   this list of conditions and the following disclaimer in the documentation
14 *		   and/or other materials provided with the distribution.
15 *
16 *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
17 *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
20 *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23 *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24 *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25 *	OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 *	The views and conclusions contained in the software and documentation are those
28 *	of the authors and should not be interpreted as representing official policies,
29 *	either expressed or implied, of Porchdog Software.
30 */
31
32#include <salt/salt.h>
33#include <salt/address.h>
34#include <salt/socket.h>
35#include <corby/corby.h>
36
37
38#ifdef __cplusplus
39extern "C"
40{
41#endif
42
43
44struct									_sw_corby_orb;
45typedef struct _sw_corby_orb	*	sw_corby_orb;
46typedef sw_opaque						sw_corby_orb_observer;
47typedef sw_opaque						sw_corby_servant;
48struct									_sw_corby_object;
49struct									_sw_corby_channel;
50struct									_sw_corby_message;
51struct									_sw_corby_buffer;
52
53typedef sw_result
54(HOWL_API *sw_corby_orb_accept_channel_func)(
55								sw_corby_orb						orb,
56								struct _sw_corby_channel	*	channel);
57
58
59typedef struct _sw_corby_orb_delegate
60{
61	sw_opaque								m_delegate;
62	sw_corby_orb_accept_channel_func	m_accept_channel_func;
63	sw_opaque								m_extra;
64} * sw_corby_orb_delegate;
65
66
67typedef struct _sw_corby_orb_config
68{
69	sw_string	m_name;
70	sw_uint32	m_tag;
71	sw_string	m_host;
72	sw_port	m_port;
73	sw_string	m_options;
74} sw_corby_orb_config;
75
76
77typedef sw_result
78(HOWL_API *sw_corby_servant_cb)(
79				sw_corby_servant					servant,
80				sw_salt								salt,
81				sw_corby_orb						orb,
82				struct _sw_corby_channel	*	channel,
83				struct _sw_corby_message	*	message,
84				struct _sw_corby_buffer		*	buffer,
85				sw_const_string					op,
86				sw_uint32							op_len,
87				sw_uint32							request_id,
88				sw_uint8							endian);
89
90
91typedef sw_result
92(HOWL_API *sw_corby_orb_observer_func)(
93				sw_corby_orb_observer			handler,
94				sw_salt								salt,
95				sw_corby_orb						orb,
96				struct _sw_corby_channel	*	channel,
97				sw_opaque_t							extra);
98
99
100sw_result HOWL_API
101sw_corby_orb_init(
102				sw_corby_orb						*	self,
103				sw_salt									salt,
104				const sw_corby_orb_config		*	config,
105            sw_corby_orb_observer				observer,
106            sw_corby_orb_observer_func			func,
107            sw_opaque_t								extra);
108
109
110sw_result HOWL_API
111sw_corby_orb_fina(
112				sw_corby_orb	self);
113
114
115sw_result HOWL_API
116sw_corby_orb_register_servant(
117				sw_corby_orb					self,
118				sw_corby_servant				servant,
119            sw_corby_servant_cb			cb,
120				sw_const_string				oid,
121				struct _sw_corby_object	**	object,
122				sw_const_string				protocol_name);
123
124
125sw_result HOWL_API
126sw_corby_orb_unregister_servant(
127				sw_corby_orb		self,
128				sw_const_string	oid);
129
130
131sw_result HOWL_API
132sw_corby_orb_register_bidirectional_object(
133				sw_corby_orb					self,
134				struct _sw_corby_object	*	object);
135
136
137sw_result HOWL_API
138sw_corby_orb_register_channel(
139				sw_corby_orb						self,
140				struct _sw_corby_channel	*	channel);
141
142
143sw_corby_orb_delegate HOWL_API
144sw_corby_orb_get_delegate(
145				sw_corby_orb						self);
146
147
148sw_result HOWL_API
149sw_corby_orb_set_delegate(
150				sw_corby_orb						self,
151				sw_corby_orb_delegate			delegate);
152
153
154sw_result HOWL_API
155sw_corby_orb_set_observer(
156				sw_corby_orb						self,
157				sw_corby_orb_observer			observer,
158				sw_corby_orb_observer_func		func,
159				sw_opaque_t							extra);
160
161
162sw_result HOWL_API
163sw_corby_orb_protocol_to_address(
164				sw_corby_orb		self,
165				sw_const_string	tag,
166				sw_string			addr,
167				sw_port		*	port);
168
169
170sw_result HOWL_API
171sw_corby_orb_protocol_to_url(
172				sw_corby_orb		self,
173				sw_const_string	tag,
174				sw_const_string	name,
175				sw_string			url,
176				sw_size_t			url_len);
177
178
179sw_result HOWL_API
180sw_corby_orb_read_channel(
181				sw_corby_orb						self,
182				struct _sw_corby_channel	*	channel);
183
184
185sw_result HOWL_API
186sw_corby_orb_dispatch_message(
187				sw_corby_orb						self,
188				struct _sw_corby_channel	*	channel,
189				struct _sw_corby_message	*	message,
190				struct _sw_corby_buffer		*	buffer,
191				sw_uint8							endian);
192
193
194#ifdef __cplusplus
195}
196#endif
197
198
199#endif
200