]> git.meshlink.io Git - catta/blob - avahi-compat-howl/include/corby/object.h
1cfd516b1061e1d4154df311a067e37218805204
[catta] / avahi-compat-howl / include / corby / object.h
1 #ifndef _corby_object_h
2 #define _corby_object_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 <corby/message.h>
34 #include <corby/channel.h>
35 #include <corby/buffer.h>
36 #include <corby/corby.h>
37
38 #if defined(__cplusplus)
39 extern "C"
40 {
41 #endif
42
43 struct                                                                          _sw_corby_orb;
44 struct                                                                          _sw_corby_object;
45 typedef struct _sw_corby_object *       sw_corby_object;
46 typedef sw_opaque                                                       sw_corby_object_send_completion_handler;
47 typedef void
48 (HOWL_API *sw_corby_object_send_completion_func)(
49                                                                                                 sw_corby_object object,
50                                                                                                 sw_corby_buffer buffer,
51                                                                                                 sw_result                       result);
52
53
54
55 sw_result HOWL_API
56 sw_corby_object_init_from_url(
57                                                         sw_corby_object                 *       self,
58                                                         struct _sw_corby_orb            *       orb,
59                                                         sw_const_string                         url,
60                                                         sw_socket_options                               options,
61                                                         sw_uint32                                                       bufsize);
62
63
64 sw_result HOWL_API
65 sw_corby_object_fina(
66                                                         sw_corby_object         self);
67
68
69 sw_result HOWL_API
70 sw_corby_object_start_request(
71                                                         sw_corby_object                 self,
72                                                         sw_const_string         op,
73                                                         sw_uint32                                       op_len,
74                                                         sw_bool                                 reply_expected,
75                                                         sw_corby_buffer *       buffer);
76
77
78 sw_result HOWL_API
79 sw_corby_object_send(
80                                                         sw_corby_object                                 self,
81                                                         sw_corby_buffer                                 buffer,
82                                                         sw_corby_buffer_observer                observer,
83                                                         sw_corby_buffer_written_func    func,
84                                                         sw_opaque                                                       extra);
85
86
87 sw_result HOWL_API
88 sw_corby_object_recv(
89                                                         sw_corby_object         self,
90                                                         sw_corby_message        *       message,
91                      sw_corby_buffer    *       buffer,
92                      sw_uint8                           *       endian,
93                      sw_bool                                    block);
94
95
96 sw_result HOWL_API
97 sw_corby_object_channel(
98                                                         sw_corby_object         self,
99                                                         sw_corby_channel        *       channel);
100
101
102 sw_result HOWL_API
103 sw_corby_object_set_channel(
104                                                         sw_corby_object         self,
105                                                         sw_corby_channel                channel);
106
107
108 #if defined(__cplusplus)
109 }
110 #endif
111
112
113 #endif