summaryrefslogtreecommitdiffstats
path: root/avahi-compat-howl/include/corby
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-12 22:37:25 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-12 22:37:25 +0000
commitc6bf0e465bceac2ef0e5f3a3ba97ae1f8b251a40 (patch)
treed08372753c9fda3f21939fba12fc6ef9ce598978 /avahi-compat-howl/include/corby
parentac550214812696d5ec68900d02df823d13724e47 (diff)
add howl headers
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@747 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-compat-howl/include/corby')
-rw-r--r--avahi-compat-howl/include/corby/buffer.h330
-rw-r--r--avahi-compat-howl/include/corby/channel.h186
-rw-r--r--avahi-compat-howl/include/corby/corby.h68
-rw-r--r--avahi-compat-howl/include/corby/message.h60
-rw-r--r--avahi-compat-howl/include/corby/object.h113
-rw-r--r--avahi-compat-howl/include/corby/orb.h199
6 files changed, 956 insertions, 0 deletions
diff --git a/avahi-compat-howl/include/corby/buffer.h b/avahi-compat-howl/include/corby/buffer.h
new file mode 100644
index 0000000..017ad5d
--- /dev/null
+++ b/avahi-compat-howl/include/corby/buffer.h
@@ -0,0 +1,330 @@
+#ifndef _sw_corby_buffer_h
+#define _sw_corby_buffer_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those
+ * of the authors and should not be interpreted as representing official policies,
+ * either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <corby/corby.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct _sw_corby_buffer;
+typedef struct _sw_corby_buffer * sw_corby_buffer;
+struct _sw_corby_object;
+typedef sw_opaque sw_corby_buffer_delegate;
+typedef sw_opaque sw_corby_buffer_observer;
+
+
+typedef enum _sw_corby_buffer_pad
+{
+ SW_CORBY_BUFFER_PAD_NONE,
+ SW_CORBY_BUFFER_PAD_ALIGN_2,
+ SW_CORBY_BUFFER_PAD_ALIGN_4,
+ SW_CORBY_BUFFER_PAD_ALIGN_8,
+ SW_CORBY_BUFFER_PAD_ALIGN_16,
+ SW_CORBY_BUFFER_PAD_ALIGN_32
+} sw_corby_buffer_pad;
+
+
+typedef sw_result
+(HOWL_API* sw_corby_buffer_written_func)(
+ sw_corby_buffer_observer observer,
+ sw_corby_buffer buffer,
+ sw_result result,
+ sw_size_t bytesWritten,
+ sw_opaque_t extra);
+
+
+typedef sw_result
+(HOWL_API* sw_corby_buffer_overflow_func)(
+ sw_corby_buffer_delegate delegate,
+ sw_corby_buffer buffer,
+ sw_uint8 octet,
+ sw_uint8 ** base,
+ sw_uint8 ** bptr,
+ sw_uint8 ** eptr,
+ sw_uint8 ** end,
+ sw_opaque_t extra);
+
+
+typedef sw_result
+(HOWL_API* sw_corby_buffer_underflow_func)(
+ sw_corby_buffer_delegate delegate,
+ sw_corby_buffer buffer,
+ sw_uint8 * octet,
+ sw_uint8 ** base,
+ sw_uint8 ** bptr,
+ sw_uint8 ** eptr,
+ sw_uint8 ** end,
+ sw_opaque_t extra);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init(
+ sw_corby_buffer * self);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init_with_size(
+ sw_corby_buffer * self,
+ sw_size_t size);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init_with_delegate(
+ sw_corby_buffer * self,
+ sw_corby_buffer_delegate delegate,
+ sw_corby_buffer_overflow_func overflow,
+ sw_corby_buffer_underflow_func underflow,
+ sw_opaque_t extra);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init_with_size_and_delegate(
+ sw_corby_buffer * self,
+ sw_size_t size,
+ sw_corby_buffer_delegate delegate,
+ sw_corby_buffer_overflow_func overflow,
+ sw_corby_buffer_underflow_func underflow,
+ sw_opaque_t extra);
+
+
+sw_result HOWL_API
+sw_corby_buffer_fina(
+ sw_corby_buffer self);
+
+
+void HOWL_API
+sw_corby_buffer_reset(
+ sw_corby_buffer self);
+
+
+sw_result HOWL_API
+sw_corby_buffer_set_octets(
+ sw_corby_buffer self,
+ sw_octets octets,
+ sw_size_t size);
+
+
+sw_octets HOWL_API
+sw_corby_buffer_octets(
+ sw_corby_buffer self);
+
+
+sw_size_t HOWL_API
+sw_corby_buffer_bytes_used(
+ sw_corby_buffer self);
+
+
+sw_size_t HOWL_API
+sw_corby_buffer_size(
+ sw_corby_buffer self);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_int8(
+ sw_corby_buffer self,
+ sw_int8 val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_uint8(
+ sw_corby_buffer self,
+ sw_uint8 val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_int16(
+ sw_corby_buffer self,
+ sw_int16 val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_uint16(
+ sw_corby_buffer self,
+ sw_uint16 val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_int32(
+ sw_corby_buffer self,
+ sw_int32 val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_uint32(
+ sw_corby_buffer self,
+ sw_uint32 val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_octets(
+ sw_corby_buffer self,
+ sw_const_octets val,
+ sw_size_t size);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_sized_octets(
+ sw_corby_buffer self,
+ sw_const_octets val,
+ sw_uint32 len);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_cstring(
+ sw_corby_buffer self,
+ sw_const_string val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_object(
+ sw_corby_buffer self,
+ const struct _sw_corby_object * object);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_pad(
+ sw_corby_buffer self,
+ sw_corby_buffer_pad pad);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_int8(
+ sw_corby_buffer self,
+ sw_int8 * val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_uint8(
+ sw_corby_buffer self,
+ sw_uint8 * val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_int16(
+ sw_corby_buffer self,
+ sw_int16 * val,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_uint16(
+ sw_corby_buffer self,
+ sw_uint16 * val,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_int32(
+ sw_corby_buffer self,
+ sw_int32 * val,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_uint32(
+ sw_corby_buffer self,
+ sw_uint32 * val,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_octets(
+ sw_corby_buffer self,
+ sw_octets octets,
+ sw_size_t size);
+
+
+sw_result HOWL_API
+sw_corby_buffer_allocate_and_get_sized_octets(
+ sw_corby_buffer self,
+ sw_octets * val,
+ sw_uint32 * size,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_zerocopy_sized_octets(
+ sw_corby_buffer self,
+ sw_octets * val,
+ sw_uint32 * size,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_sized_octets(
+ sw_corby_buffer self,
+ sw_octets val,
+ sw_uint32 * len,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_allocate_and_get_cstring(
+ sw_corby_buffer self,
+ sw_string * val,
+ sw_uint32 * len,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_zerocopy_cstring(
+ sw_corby_buffer self,
+ sw_string * val,
+ sw_uint32 * len,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_cstring(
+ sw_corby_buffer self,
+ sw_string val,
+ sw_uint32 * len,
+ sw_uint8 endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_object(
+ sw_corby_buffer self,
+ struct _sw_corby_object ** object,
+ sw_uint8 endian);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-compat-howl/include/corby/channel.h b/avahi-compat-howl/include/corby/channel.h
new file mode 100644
index 0000000..823e027
--- /dev/null
+++ b/avahi-compat-howl/include/corby/channel.h
@@ -0,0 +1,186 @@
+#ifndef _sw_corby_channel_h
+#define _sw_corby_channel_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those
+ * of the authors and should not be interpreted as representing official policies,
+ * either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <salt/socket.h>
+#include <corby/corby.h>
+#include <corby/buffer.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct _sw_corby_channel;
+typedef struct _sw_corby_channel * sw_corby_channel;
+struct _sw_corby_message;
+struct _sw_corby_profile;
+typedef struct _sw_corby_profile * sw_corby_profile;
+typedef struct _sw_corby_profile const * sw_const_corby_profile;
+
+
+typedef enum _sw_corby_reply_status
+{
+ SW_CORBY_NO_EXCEPTION = 0,
+ SW_CORBY_SYSTEM_EXCEPTION = 1,
+ SW_CORBY_USER_EXCEPTION = 2,
+ SW_CORBY_LOCATION_FORWARD = 3
+} sw_corby_reply_status;
+
+
+typedef sw_result
+(HOWL_API *sw_corby_channel_will_send_func)(
+ sw_corby_channel channel,
+ sw_octets bytes,
+ sw_size_t len,
+ sw_opaque_t extra);
+
+
+typedef sw_result
+(HOWL_API *sw_corby_channel_did_read_func)(
+ sw_corby_channel channel,
+ sw_octets bytes,
+ sw_size_t len,
+ sw_opaque_t extra);
+
+
+typedef void
+(HOWL_API *sw_corby_channel_cleanup_func)(
+ sw_corby_channel channel);
+
+
+typedef struct _sw_corby_channel_delegate
+{
+ sw_opaque_t m_delegate;
+ sw_corby_channel_will_send_func m_will_send_func;
+ sw_corby_channel_did_read_func m_did_read_func;
+ sw_corby_channel_cleanup_func m_cleanup_func;
+ sw_opaque_t m_extra;
+} * sw_corby_channel_delegate;
+
+
+sw_result HOWL_API
+sw_corby_channel_start_request(
+ sw_corby_channel self,
+ sw_const_corby_profile profile,
+ struct _sw_corby_buffer ** buffer,
+ sw_const_string op,
+ sw_uint32 oplen,
+ sw_bool reply_expected);
+
+
+sw_result HOWL_API
+sw_corby_channel_start_reply(
+ sw_corby_channel self,
+ struct _sw_corby_buffer ** buffer,
+ sw_uint32 request_id,
+ sw_corby_reply_status status);
+
+
+sw_result HOWL_API
+sw_corby_channel_send(
+ sw_corby_channel self,
+ struct _sw_corby_buffer * buffer,
+ sw_corby_buffer_observer observer,
+ sw_corby_buffer_written_func func,
+ sw_opaque_t extra);
+
+
+sw_result HOWL_API
+sw_corby_channel_recv(
+ sw_corby_channel self,
+ sw_salt * salt,
+ struct _sw_corby_message ** message,
+ sw_uint32 * request_id,
+ sw_string * op,
+ sw_uint32 * op_len,
+ struct _sw_corby_buffer ** buffer,
+ sw_uint8 * endian,
+ sw_bool block);
+
+
+sw_result HOWL_API
+sw_corby_channel_last_recv_from(
+ sw_corby_channel self,
+ sw_ipv4_address * from,
+ sw_port * from_port);
+
+
+sw_result HOWL_API
+sw_corby_channel_ff(
+ sw_corby_channel self,
+ struct _sw_corby_buffer * buffer);
+
+
+sw_socket HOWL_API
+sw_corby_channel_socket(
+ sw_corby_channel self);
+
+
+sw_result HOWL_API
+sw_corby_channel_retain(
+ sw_corby_channel self);
+
+
+sw_result HOWL_API
+sw_corby_channel_set_delegate(
+ sw_corby_channel self,
+ sw_corby_channel_delegate delegate);
+
+
+sw_corby_channel_delegate HOWL_API
+sw_corby_channel_get_delegate(
+ sw_corby_channel self);
+
+
+void HOWL_API
+sw_corby_channel_set_app_data(
+ sw_corby_channel self,
+ sw_opaque app_data);
+
+
+sw_opaque HOWL_API
+sw_corby_channel_get_app_data(
+ sw_corby_channel self);
+
+
+sw_result HOWL_API
+sw_corby_channel_fina(
+ sw_corby_channel self);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-compat-howl/include/corby/corby.h b/avahi-compat-howl/include/corby/corby.h
new file mode 100644
index 0000000..7d68138
--- /dev/null
+++ b/avahi-compat-howl/include/corby/corby.h
@@ -0,0 +1,68 @@
+#ifndef _corby_corby_h
+#define _corby_corby_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those
+ * of the authors and should not be interpreted as representing official policies,
+ * either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/platform.h>
+
+/*
+ * corby limits
+ */
+#define SW_CORBY_OID_LEN 32
+
+
+/*
+ * protocol tags. the only standard one is TAG_INTERNET_IIOP.
+ * the others are proprietary pandora corby protocols.
+ */
+#define SW_TAG_INTERNET_IOP 0
+#define SW_TAG_UIOP 250
+#define SW_TAG_MIOP 251
+#define SW_MIOP_ADDR "231.255.255.250"
+typedef sw_uint32 sw_corby_protocol_tag;
+
+
+/*
+ * error codes
+ */
+#define SW_E_CORBY_BASE 0x80000500
+#define SW_E_CORBY_UNKNOWN (SW_E_CORBY_BASE + 0)
+#define SW_E_CORBY_BAD_CONFIG (SW_E_CORBY_BASE + 1)
+#define SW_E_CORBY_NO_INTERFACE (SW_E_CORBY_BASE + 2)
+#define SW_E_CORBY_BAD_URL (SW_E_CORBY_BASE + 3)
+#define SW_E_CORBY_BAD_NAME (SW_E_CORBY_BASE + 4)
+#define SW_E_CORBY_BAD_MESSAGE (SW_E_CORBY_BASE + 5)
+#define SW_E_CORBY_BAD_VERSION (SW_E_CORBY_BASE + 6)
+#define SW_E_CORBY_BAD_OID (SW_E_CORBY_BASE + 7)
+#define SW_E_CORBY_BAD_OPERATION (SW_E_CORBY_BASE + 8)
+#define SW_E_CORBY_MARSHAL (SW_E_CORBY_BASE + 10)
+#define SW_E_CORBY_OBJECT_NOT_EXIST (SW_E_CORBY_BASE + 11)
+
+
+#endif
diff --git a/avahi-compat-howl/include/corby/message.h b/avahi-compat-howl/include/corby/message.h
new file mode 100644
index 0000000..406b9b9
--- /dev/null
+++ b/avahi-compat-howl/include/corby/message.h
@@ -0,0 +1,60 @@
+#ifndef _sw_corby_message_h
+#define _sw_corby_message_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those
+ * of the authors and should not be interpreted as representing official policies,
+ * either expressed or implied, of Porchdog Software.
+ */
+
+#include <corby/corby.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct _sw_corby_message;
+typedef struct _sw_corby_message * sw_corby_message;
+
+
+sw_result HOWL_API
+sw_corby_message_init(
+ sw_corby_message * self);
+
+
+sw_result HOWL_API
+sw_corby_message_fina(
+ sw_corby_message self);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-compat-howl/include/corby/object.h b/avahi-compat-howl/include/corby/object.h
new file mode 100644
index 0000000..1bc7407
--- /dev/null
+++ b/avahi-compat-howl/include/corby/object.h
@@ -0,0 +1,113 @@
+#ifndef _corby_object_h
+#define _corby_object_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those
+ * of the authors and should not be interpreted as representing official policies,
+ * either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <corby/message.h>
+#include <corby/channel.h>
+#include <corby/buffer.h>
+#include <corby/corby.h>
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+struct _sw_corby_orb;
+struct _sw_corby_object;
+typedef struct _sw_corby_object * sw_corby_object;
+typedef sw_opaque sw_corby_object_send_completion_handler;
+typedef void
+(HOWL_API *sw_corby_object_send_completion_func)(
+ sw_corby_object object,
+ sw_corby_buffer buffer,
+ sw_result result);
+
+
+
+sw_result HOWL_API
+sw_corby_object_init_from_url(
+ sw_corby_object * self,
+ struct _sw_corby_orb * orb,
+ sw_const_string url,
+ sw_socket_options options,
+ sw_uint32 bufsize);
+
+
+sw_result HOWL_API
+sw_corby_object_fina(
+ sw_corby_object self);
+
+
+sw_result HOWL_API
+sw_corby_object_start_request(
+ sw_corby_object self,
+ sw_const_string op,
+ sw_uint32 op_len,
+ sw_bool reply_expected,
+ sw_corby_buffer * buffer);
+
+
+sw_result HOWL_API
+sw_corby_object_send(
+ sw_corby_object self,
+ sw_corby_buffer buffer,
+ sw_corby_buffer_observer observer,
+ sw_corby_buffer_written_func func,
+ sw_opaque extra);
+
+
+sw_result HOWL_API
+sw_corby_object_recv(
+ sw_corby_object self,
+ sw_corby_message * message,
+ sw_corby_buffer * buffer,
+ sw_uint8 * endian,
+ sw_bool block);
+
+
+sw_result HOWL_API
+sw_corby_object_channel(
+ sw_corby_object self,
+ sw_corby_channel * channel);
+
+
+sw_result HOWL_API
+sw_corby_object_set_channel(
+ sw_corby_object self,
+ sw_corby_channel channel);
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif
diff --git a/avahi-compat-howl/include/corby/orb.h b/avahi-compat-howl/include/corby/orb.h
new file mode 100644
index 0000000..a674082
--- /dev/null
+++ b/avahi-compat-howl/include/corby/orb.h
@@ -0,0 +1,199 @@
+#ifndef _corby_orb_h
+#define _corby_orb_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those
+ * of the authors and should not be interpreted as representing official policies,
+ * either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <salt/address.h>
+#include <salt/socket.h>
+#include <corby/corby.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct _sw_corby_orb;
+typedef struct _sw_corby_orb * sw_corby_orb;
+typedef sw_opaque sw_corby_orb_observer;
+typedef sw_opaque sw_corby_servant;
+struct _sw_corby_object;
+struct _sw_corby_channel;
+struct _sw_corby_message;
+struct _sw_corby_buffer;
+
+typedef sw_result
+(HOWL_API *sw_corby_orb_accept_channel_func)(
+ sw_corby_orb orb,
+ struct _sw_corby_channel * channel);
+
+
+typedef struct _sw_corby_orb_delegate
+{
+ sw_opaque m_delegate;
+ sw_corby_orb_accept_channel_func m_accept_channel_func;
+ sw_opaque m_extra;
+} * sw_corby_orb_delegate;
+
+
+typedef struct _sw_corby_orb_config
+{
+ sw_string m_name;
+ sw_uint32 m_tag;
+ sw_string m_host;
+ sw_port m_port;
+ sw_string m_options;
+} sw_corby_orb_config;
+
+
+typedef sw_result
+(HOWL_API *sw_corby_servant_cb)(
+ sw_corby_servant servant,
+ sw_salt salt,
+ sw_corby_orb orb,
+ struct _sw_corby_channel * channel,
+ struct _sw_corby_message * message,
+ struct _sw_corby_buffer * buffer,
+ sw_const_string op,
+ sw_uint32 op_len,
+ sw_uint32 request_id,
+ sw_uint8 endian);
+
+
+typedef sw_result
+(HOWL_API *sw_corby_orb_observer_func)(
+ sw_corby_orb_observer handler,
+ sw_salt salt,
+ sw_corby_orb orb,
+ struct _sw_corby_channel * channel,
+ sw_opaque_t extra);
+
+
+sw_result HOWL_API
+sw_corby_orb_init(
+ sw_corby_orb * self,
+ sw_salt salt,
+ const sw_corby_orb_config * config,
+ sw_corby_orb_observer observer,
+ sw_corby_orb_observer_func func,
+ sw_opaque_t extra);
+
+
+sw_result HOWL_API
+sw_corby_orb_fina(
+ sw_corby_orb self);
+
+
+sw_result HOWL_API
+sw_corby_orb_register_servant(
+ sw_corby_orb self,
+ sw_corby_servant servant,
+ sw_corby_servant_cb cb,
+ sw_const_string oid,
+ struct _sw_corby_object ** object,
+ sw_const_string protocol_name);
+
+
+sw_result HOWL_API
+sw_corby_orb_unregister_servant(
+ sw_corby_orb self,
+ sw_const_string oid);
+
+
+sw_result HOWL_API
+sw_corby_orb_register_bidirectional_object(
+ sw_corby_orb self,
+ struct _sw_corby_object * object);
+
+
+sw_result HOWL_API
+sw_corby_orb_register_channel(
+ sw_corby_orb self,
+ struct _sw_corby_channel * channel);
+
+
+sw_corby_orb_delegate HOWL_API
+sw_corby_orb_get_delegate(
+ sw_corby_orb self);
+
+
+sw_result HOWL_API
+sw_corby_orb_set_delegate(
+ sw_corby_orb self,
+ sw_corby_orb_delegate delegate);
+
+
+sw_result HOWL_API
+sw_corby_orb_set_observer(
+ sw_corby_orb self,
+ sw_corby_orb_observer observer,
+ sw_corby_orb_observer_func func,
+ sw_opaque_t extra);
+
+
+sw_result HOWL_API
+sw_corby_orb_protocol_to_address(
+ sw_corby_orb self,
+ sw_const_string tag,
+ sw_string addr,
+ sw_port * port);
+
+
+sw_result HOWL_API
+sw_corby_orb_protocol_to_url(
+ sw_corby_orb self,
+ sw_const_string tag,
+ sw_const_string name,
+ sw_string url,
+ sw_size_t url_len);
+
+
+sw_result HOWL_API
+sw_corby_orb_read_channel(
+ sw_corby_orb self,
+ struct _sw_corby_channel * channel);
+
+
+sw_result HOWL_API
+sw_corby_orb_dispatch_message(
+ sw_corby_orb self,
+ struct _sw_corby_channel * channel,
+ struct _sw_corby_message * message,
+ struct _sw_corby_buffer * buffer,
+ sw_uint8 endian);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif