Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1E1C0200B84 for ; Tue, 6 Sep 2016 07:18:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1C7F6160AD3; Tue, 6 Sep 2016 05:18:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E95BE160ABC for ; Tue, 6 Sep 2016 07:18:26 +0200 (CEST) Received: (qmail 13774 invoked by uid 500); 6 Sep 2016 05:18:25 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 13759 invoked by uid 99); 6 Sep 2016 05:18:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 05:18:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D46C3C0115 for ; Tue, 6 Sep 2016 05:18:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id X6v8zbzXvb75 for ; Tue, 6 Sep 2016 05:18:03 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id D594D60D9D for ; Tue, 6 Sep 2016 05:17:50 +0000 (UTC) Received: (qmail 11180 invoked by uid 99); 6 Sep 2016 05:17:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 05:17:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 26027EEE38; Tue, 6 Sep 2016 05:17:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rlei@apache.org To: commits@hawq.incubator.apache.org Date: Tue, 06 Sep 2016 05:17:59 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [12/51] [partial] incubator-hawq git commit: HAWQ-959. revert thrift build commands. archived-at: Tue, 06 Sep 2016 05:18:29 -0000 http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c deleted file mode 100644 index d6315d8..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c +++ /dev/null @@ -1,589 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include -#include -#include - -/* define the GError domain string */ -#define THRIFT_PROTOCOL_ERROR_DOMAIN "thrift-protocol-error-quark" - -/* object properties */ -enum _ThriftProtocolProperties -{ - PROP_0, - PROP_THRIFT_PROTOCOL_TRANSPORT -}; - -G_DEFINE_ABSTRACT_TYPE(ThriftProtocol, thrift_protocol, G_TYPE_OBJECT) - -void -thrift_protocol_get_property (GObject *object, guint property_id, - GValue *value, GParamSpec *pspec) -{ - ThriftProtocol *protocol = THRIFT_PROTOCOL (object); - - THRIFT_UNUSED_VAR (pspec); - - switch (property_id) - { - case PROP_THRIFT_PROTOCOL_TRANSPORT: - g_value_set_object (value, protocol->transport); - break; - } -} - -void -thrift_protocol_set_property (GObject *object, guint property_id, - const GValue *value, GParamSpec *pspec) -{ - - ThriftProtocol *protocol = THRIFT_PROTOCOL (object); - - THRIFT_UNUSED_VAR (pspec); - - switch (property_id) - { - case PROP_THRIFT_PROTOCOL_TRANSPORT: - protocol->transport = g_value_get_object (value); - break; - } -} - - -gint32 -thrift_protocol_write_message_begin (ThriftProtocol *protocol, - const gchar *name, - const ThriftMessageType message_type, - const gint32 seqid, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_message_begin - (protocol, name, - message_type, seqid, - error); -} - -gint32 -thrift_protocol_write_message_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_message_end (protocol, - error); -} - -gint32 -thrift_protocol_write_struct_begin (ThriftProtocol *protocol, const gchar *name, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_struct_begin (protocol, - name, error); -} - -gint32 -thrift_protocol_write_struct_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_struct_end (protocol, - error); -} - -gint32 -thrift_protocol_write_field_begin (ThriftProtocol *protocol, - const gchar *name, - const ThriftType field_type, - const gint16 field_id, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_field_begin (protocol, - name, field_type, - field_id, error); -} - -gint32 -thrift_protocol_write_field_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_field_end (protocol, - error); -} - -gint32 -thrift_protocol_write_field_stop (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_field_stop (protocol, - error); -} - -gint32 -thrift_protocol_write_map_begin (ThriftProtocol *protocol, - const ThriftType key_type, - const ThriftType value_type, - const guint32 size, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_map_begin (protocol, - key_type, value_type, - size, error); -} - -gint32 -thrift_protocol_write_map_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_map_end (protocol, - error); -} - -gint32 -thrift_protocol_write_list_begin (ThriftProtocol *protocol, - const ThriftType element_type, - const guint32 size, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_list_begin (protocol, - element_type, size, - error); -} - -gint32 -thrift_protocol_write_list_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_list_end (protocol, - error); -} - -gint32 -thrift_protocol_write_set_begin (ThriftProtocol *protocol, - const ThriftType element_type, - const guint32 size, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_set_begin (protocol, - element_type, size, - error); -} - -gint32 -thrift_protocol_write_set_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_set_end (protocol, - error); -} - -gint32 -thrift_protocol_write_bool (ThriftProtocol *protocol, - const gboolean value, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_bool (protocol, value, - error); -} - -gint32 -thrift_protocol_write_byte (ThriftProtocol *protocol, const gint8 value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_byte (protocol, value, - error); -} - -gint32 -thrift_protocol_write_i16 (ThriftProtocol *protocol, const gint16 value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_i16 (protocol, value, - error); -} - -gint32 -thrift_protocol_write_i32 (ThriftProtocol *protocol, const gint32 value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_i32 (protocol, value, - error); -} - -gint32 -thrift_protocol_write_i64 (ThriftProtocol *protocol, const gint64 value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_i64 (protocol, value, - error); -} - -gint32 -thrift_protocol_write_double (ThriftProtocol *protocol, - const gdouble value, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_double (protocol, - value, error); -} - -gint32 -thrift_protocol_write_string (ThriftProtocol *protocol, - const gchar *str, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_string (protocol, str, - error); -} - -gint32 -thrift_protocol_write_binary (ThriftProtocol *protocol, const gpointer buf, - const guint32 len, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->write_binary (protocol, buf, - len, error); -} - -gint32 -thrift_protocol_read_message_begin (ThriftProtocol *protocol, - gchar **name, - ThriftMessageType *message_type, - gint32 *seqid, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_message_begin (protocol, - name, message_type, - seqid, error); -} - -gint32 -thrift_protocol_read_message_end (ThriftProtocol *protocol, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_message_end (protocol, - error); -} - -gint32 -thrift_protocol_read_struct_begin (ThriftProtocol *protocol, - gchar **name, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_struct_begin (protocol, - name, - error); -} - -gint32 -thrift_protocol_read_struct_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_struct_end (protocol, - error); -} - -gint32 -thrift_protocol_read_field_begin (ThriftProtocol *protocol, - gchar **name, - ThriftType *field_type, - gint16 *field_id, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_field_begin (protocol, - name, - field_type, - field_id, - error); -} - -gint32 -thrift_protocol_read_field_end (ThriftProtocol *protocol, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_field_end (protocol, - error); -} - -gint32 -thrift_protocol_read_map_begin (ThriftProtocol *protocol, - ThriftType *key_type, - ThriftType *value_type, guint32 *size, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_map_begin (protocol, - key_type, - value_type, - size, - error); -} - -gint32 -thrift_protocol_read_map_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_map_end (protocol, - error); -} - -gint32 -thrift_protocol_read_list_begin (ThriftProtocol *protocol, - ThriftType *element_type, - guint32 *size, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_list_begin (protocol, - element_type, - size, error); -} - -gint32 -thrift_protocol_read_list_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_list_end (protocol, - error); -} - -gint32 -thrift_protocol_read_set_begin (ThriftProtocol *protocol, - ThriftType *element_type, - guint32 *size, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_set_begin (protocol, - element_type, - size, error); -} - -gint32 -thrift_protocol_read_set_end (ThriftProtocol *protocol, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_set_end (protocol, - error); -} - -gint32 -thrift_protocol_read_bool (ThriftProtocol *protocol, gboolean *value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_bool (protocol, value, - error); -} - -gint32 -thrift_protocol_read_byte (ThriftProtocol *protocol, gint8 *value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_byte (protocol, value, - error); -} - -gint32 -thrift_protocol_read_i16 (ThriftProtocol *protocol, gint16 *value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_i16 (protocol, value, - error); -} - -gint32 -thrift_protocol_read_i32 (ThriftProtocol *protocol, gint32 *value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_i32 (protocol, value, - error); -} - -gint32 -thrift_protocol_read_i64 (ThriftProtocol *protocol, gint64 *value, - GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_i64 (protocol, value, - error); -} - -gint32 -thrift_protocol_read_double (ThriftProtocol *protocol, - gdouble *value, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_double (protocol, value, - error); -} - -gint32 -thrift_protocol_read_string (ThriftProtocol *protocol, - gchar **str, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_string (protocol, str, - error); -} - -gint32 -thrift_protocol_read_binary (ThriftProtocol *protocol, gpointer *buf, - guint32 *len, GError **error) -{ - return THRIFT_PROTOCOL_GET_CLASS (protocol)->read_binary (protocol, buf, - len, error); -} - -gint32 -thrift_protocol_skip (ThriftProtocol *protocol, ThriftType type, GError **error) -{ - switch (type) - { - case T_BOOL: - { - gboolean boolv; - return thrift_protocol_read_bool (protocol, &boolv, error); - } - case T_BYTE: - { - gint8 bytev; - return thrift_protocol_read_byte (protocol, &bytev, error); - } - - case T_I16: - { - gint16 i16; - return thrift_protocol_read_i16 (protocol, &i16, error); - } - case T_I32: - { - gint32 i32; - return thrift_protocol_read_i32 (protocol, &i32, error); - } - case T_I64: - { - gint64 i64; - return thrift_protocol_read_i64 (protocol, &i64, error); - } - case T_DOUBLE: - { - gdouble dub; - return thrift_protocol_read_double (protocol, &dub, error); - } - case T_STRING: - { - gpointer data; - guint32 len; - gint32 ret = thrift_protocol_read_binary (protocol, &data, &len, error); - g_free (data); - return ret; - } - case T_STRUCT: - { - guint32 result = 0; - gchar *name; - gint16 fid; - ThriftType ftype; - result += thrift_protocol_read_struct_begin (protocol, &name, error); - - while (1) - { - result += thrift_protocol_read_field_begin (protocol, &name, &ftype, - &fid, error); - if (ftype == T_STOP) - { - break; - } - result += thrift_protocol_skip (protocol, ftype, error); - result += thrift_protocol_read_field_end (protocol, error); - } - result += thrift_protocol_read_struct_end (protocol, error); - return result; - } - case T_MAP: - { - guint32 result = 0; - ThriftType elem_type; - guint32 i, size; - result += thrift_protocol_read_set_begin (protocol, &elem_type, &size, - error); - for (i = 0; i < size; i++) - { - result += thrift_protocol_skip (protocol, elem_type, error); - } - result += thrift_protocol_read_set_end (protocol, error); - return result; - } - case T_LIST: - { - guint32 result = 0; - ThriftType elem_type; - guint32 i, size; - result += thrift_protocol_read_list_begin (protocol, &elem_type, &size, - error); - for (i = 0; i < size; i++) - { - result += thrift_protocol_skip (protocol, elem_type, error); - } - result += thrift_protocol_read_list_end (protocol, error); - return result; - } - default: - return 0; - } -} - -/* define the GError domain for Thrift protocols */ -GQuark -thrift_protocol_error_quark (void) -{ - return g_quark_from_static_string (THRIFT_PROTOCOL_ERROR_DOMAIN); -} - - -static void -thrift_protocol_init (ThriftProtocol *protocol) -{ - protocol->transport = NULL; -} - -static void -thrift_protocol_class_init (ThriftProtocolClass *cls) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (cls); - - gobject_class->get_property = thrift_protocol_get_property; - gobject_class->set_property = thrift_protocol_set_property; - - g_object_class_install_property (gobject_class, - PROP_THRIFT_PROTOCOL_TRANSPORT, - g_param_spec_object ("transport", "Transport", "Thrift Transport", - THRIFT_TYPE_TRANSPORT, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - cls->write_message_begin = thrift_protocol_write_message_begin; - cls->write_message_end = thrift_protocol_write_message_end; - cls->write_struct_begin = thrift_protocol_write_struct_begin; - cls->write_struct_end = thrift_protocol_write_struct_end; - cls->write_field_begin = thrift_protocol_write_field_begin; - cls->write_field_end = thrift_protocol_write_field_end; - cls->write_field_stop = thrift_protocol_write_field_stop; - cls->write_map_begin = thrift_protocol_write_map_begin; - cls->write_map_end = thrift_protocol_write_map_end; - cls->write_list_begin = thrift_protocol_write_list_begin; - cls->write_list_end = thrift_protocol_write_list_end; - cls->write_set_begin = thrift_protocol_write_set_begin; - cls->write_set_end = thrift_protocol_write_set_end; - cls->write_bool = thrift_protocol_write_bool; - cls->write_byte = thrift_protocol_write_byte; - cls->write_i16 = thrift_protocol_write_i16; - cls->write_i32 = thrift_protocol_write_i32; - cls->write_i64 = thrift_protocol_write_i64; - cls->write_double = thrift_protocol_write_double; - cls->write_string = thrift_protocol_write_string; - cls->write_binary = thrift_protocol_write_binary; - cls->read_message_begin = thrift_protocol_read_message_begin; - cls->read_message_end = thrift_protocol_read_message_end; - cls->read_struct_begin = thrift_protocol_read_struct_begin; - cls->read_struct_end = thrift_protocol_read_struct_end; - cls->read_field_begin = thrift_protocol_read_field_begin; - cls->read_field_end = thrift_protocol_read_field_end; - cls->read_map_begin = thrift_protocol_read_map_begin; - cls->read_map_end = thrift_protocol_read_map_end; - cls->read_list_begin = thrift_protocol_read_list_begin; - cls->read_set_begin = thrift_protocol_read_set_begin; - cls->read_set_end = thrift_protocol_read_set_end; - cls->read_bool = thrift_protocol_read_bool; - cls->read_byte = thrift_protocol_read_byte; - cls->read_i16 = thrift_protocol_read_i16; - cls->read_i32 = thrift_protocol_read_i32; - cls->read_i64 = thrift_protocol_read_i64; - cls->read_double = thrift_protocol_read_double; - cls->read_string = thrift_protocol_read_string; - cls->read_binary = thrift_protocol_read_binary; -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h deleted file mode 100644 index 58fe5e0..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_H -#define _THRIFT_PROTOCOL_H - -#include - -#include - -G_BEGIN_DECLS - -/*! \file thrift_protocol.h - * \brief Abstract class for Thrift protocol implementations. - */ - -/** - * Enumerated definition of the types that the Thrift protocol supports. - * Take special note of the T_END type which is used specifically to mark - * the end of a sequence of fields. - */ -typedef enum { - T_STOP = 0, - T_VOID = 1, - T_BOOL = 2, - T_BYTE = 3, - T_I08 = 3, - T_I16 = 6, - T_I32 = 8, - T_U64 = 9, - T_I64 = 10, - T_DOUBLE = 4, - T_STRING = 11, - T_UTF7 = 11, - T_STRUCT = 12, - T_MAP = 13, - T_SET = 14, - T_LIST = 15, - T_UTF8 = 16, - T_UTF16 = 17 -} ThriftType; - -/** - * Enumerated definition of the message types that the Thrift protocol - * supports. - */ -typedef enum { - T_CALL = 1, - T_REPLY = 2, - T_EXCEPTION = 3, - T_ONEWAY = 4 -} ThriftMessageType; - -/* type macros */ -#define THRIFT_TYPE_PROTOCOL (thrift_protocol_get_type ()) -#define THRIFT_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THRIFT_TYPE_PROTOCOL, ThriftProtocol)) -#define THRIFT_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THRIFT_TYPE_PROTOCOL)) -#define THRIFT_PROTOCOL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), THRIFT_TYPE_PROTOCOL, ThriftProtocolClass)) -#define THRIFT_IS_PROTOCOL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_PROTOCOL)) -#define THRIFT_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_PROTOCOL, ThriftProtocolClass)) - -typedef struct _ThriftProtocol ThriftProtocol; - -/*! - * Thrift Protocol object - */ -struct _ThriftProtocol -{ - GObject parent; - - /* protected */ - ThriftTransport *transport; -}; - -typedef struct _ThriftProtocolClass ThriftProtocolClass; - -/*! - * Thrift Protocol class - */ -struct _ThriftProtocolClass -{ - GObjectClass parent; - - gint32 (*write_message_begin) (ThriftProtocol *protocol, const gchar *name, - const ThriftMessageType message_type, - const gint32 seqid, GError **error); - gint32 (*write_message_end) (ThriftProtocol *protocol, GError **error); - gint32 (*write_struct_begin) (ThriftProtocol *protocol, const gchar *name, - GError **error); - gint32 (*write_struct_end) (ThriftProtocol *protocol, GError **error); - gint32 (*write_field_begin) (ThriftProtocol *protocol, const gchar *name, - const ThriftType field_type, - const gint16 field_id, GError **error); - gint32 (*write_field_end) (ThriftProtocol *protocol, GError **error); - gint32 (*write_field_stop) (ThriftProtocol *protocol, GError **error); - gint32 (*write_map_begin) (ThriftProtocol *protocol, - const ThriftType key_type, - const ThriftType value_type, - const guint32 size, GError **error); - gint32 (*write_map_end) (ThriftProtocol *protocol, GError **error); - gint32 (*write_list_begin) (ThriftProtocol *protocol, - const ThriftType element_type, - const guint32 size, GError **error); - gint32 (*write_list_end) (ThriftProtocol *protocol, GError **error); - gint32 (*write_set_begin) (ThriftProtocol *protocol, - const ThriftType element_type, - const guint32 size, GError **error); - gint32 (*write_set_end) (ThriftProtocol *protocol, GError **error); - gint32 (*write_bool) (ThriftProtocol *protocol, const gboolean value, - GError **error); - gint32 (*write_byte) (ThriftProtocol *protocol, const gint8 value, - GError **error); - gint32 (*write_i16) (ThriftProtocol *protocol, const gint16 value, - GError **error); - gint32 (*write_i32) (ThriftProtocol *protocol, const gint32 value, - GError **error); - gint32 (*write_i64) (ThriftProtocol *protocol, const gint64 value, - GError **error); - gint32 (*write_double) (ThriftProtocol *protocol, const gdouble value, - GError **error); - gint32 (*write_string) (ThriftProtocol *protocol, const gchar *str, - GError **error); - gint32 (*write_binary) (ThriftProtocol *protocol, const gpointer buf, - const guint32 len, GError **error); - - gint32 (*read_message_begin) (ThriftProtocol *thrift_protocol, gchar **name, - ThriftMessageType *message_type, - gint32 *seqid, GError **error); - gint32 (*read_message_end) (ThriftProtocol *protocol, GError **error); - gint32 (*read_struct_begin) (ThriftProtocol *protocol, gchar **name, - GError **error); - gint32 (*read_struct_end) (ThriftProtocol *protocol, GError **error); - gint32 (*read_field_begin) (ThriftProtocol *protocol, gchar **name, - ThriftType *field_type, gint16 *field_id, - GError **error); - gint32 (*read_field_end) (ThriftProtocol *protocol, GError **error); - gint32 (*read_map_begin) (ThriftProtocol *protocol, ThriftType *key_type, - ThriftType *value_type, guint32 *size, - GError **error); - gint32 (*read_map_end) (ThriftProtocol *protocol, GError **error); - gint32 (*read_list_begin) (ThriftProtocol *protocol, ThriftType *element_type, - guint32 *size, GError **error); - gint32 (*read_list_end) (ThriftProtocol *protocol, GError **error); - gint32 (*read_set_begin) (ThriftProtocol *protocol, ThriftType *element_type, - guint32 *size, GError **error); - gint32 (*read_set_end) (ThriftProtocol *protocol, GError **error); - gint32 (*read_bool) (ThriftProtocol *protocol, gboolean *value, - GError **error); - gint32 (*read_byte) (ThriftProtocol *protocol, gint8 *value, GError **error); - gint32 (*read_i16) (ThriftProtocol *protocol, gint16 *value, GError **error); - gint32 (*read_i32) (ThriftProtocol *protocol, gint32 *value, GError **error); - gint32 (*read_i64) (ThriftProtocol *protocol, gint64 *value, GError **error); - gint32 (*read_double) (ThriftProtocol *protocol, gdouble *value, - GError **error); - gint32 (*read_string) (ThriftProtocol *protocol, gchar **str, GError **error); - gint32 (*read_binary) (ThriftProtocol *protocol, gpointer *buf, - guint32 *len, GError **error); -}; - -/* used by THRIFT_TYPE_PROTOCOL */ -GType thrift_protocol_get_type (void); - -/* virtual public methods */ -gint32 thrift_protocol_write_message_begin (ThriftProtocol *protocol, - const gchar *name, const ThriftMessageType message_type, - const gint32 seqid, GError **error); - -gint32 thrift_protocol_write_message_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_write_struct_begin (ThriftProtocol *protocol, - const gchar *name, - GError **error); - -gint32 thrift_protocol_write_struct_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_write_field_begin (ThriftProtocol *protocol, - const gchar *name, - const ThriftType field_type, - const gint16 field_id, - GError **error); - -gint32 thrift_protocol_write_field_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_write_field_stop (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_write_map_begin (ThriftProtocol *protocol, - const ThriftType key_type, - const ThriftType value_type, - const guint32 size, GError **error); - -gint32 thrift_protocol_write_map_end (ThriftProtocol *protocol, GError **error); - -gint32 thrift_protocol_write_list_begin (ThriftProtocol *protocol, - const ThriftType element_type, - const guint32 size, GError **error); - -gint32 thrift_protocol_write_list_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_write_set_begin (ThriftProtocol *protocol, - const ThriftType element_type, - const guint32 size, GError **error); - -gint32 thrift_protocol_write_set_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_write_bool (ThriftProtocol *protocol, - const gboolean value, GError **error); - -gint32 thrift_protocol_write_byte (ThriftProtocol *protocol, const gint8 value, - GError **error); - -gint32 thrift_protocol_write_i16 (ThriftProtocol *protocol, const gint16 value, - GError **error); - -gint32 thrift_protocol_write_i32 (ThriftProtocol *protocol, const gint32 value, - GError **error); - -gint32 thrift_protocol_write_i64 (ThriftProtocol *protocol, const gint64 value, - GError **error); - -gint32 thrift_protocol_write_double (ThriftProtocol *protocol, - const gdouble value, GError **error); - -gint32 thrift_protocol_write_string (ThriftProtocol *protocol, - const gchar *str, GError **error); - -gint32 thrift_protocol_write_binary (ThriftProtocol *protocol, - const gpointer buf, - const guint32 len, GError **error); - -gint32 thrift_protocol_read_message_begin (ThriftProtocol *thrift_protocol, - gchar **name, - ThriftMessageType *message_type, - gint32 *seqid, GError **error); - -gint32 thrift_protocol_read_message_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_read_struct_begin (ThriftProtocol *protocol, - gchar **name, - GError **error); - -gint32 thrift_protocol_read_struct_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_read_field_begin (ThriftProtocol *protocol, - gchar **name, - ThriftType *field_type, - gint16 *field_id, - GError **error); - -gint32 thrift_protocol_read_field_end (ThriftProtocol *protocol, - GError **error); - -gint32 thrift_protocol_read_map_begin (ThriftProtocol *protocol, - ThriftType *key_type, - ThriftType *value_type, guint32 *size, - GError **error); - -gint32 thrift_protocol_read_map_end (ThriftProtocol *protocol, GError **error); - -gint32 thrift_protocol_read_list_begin (ThriftProtocol *protocol, - ThriftType *element_type, - guint32 *size, GError **error); - -gint32 thrift_protocol_read_list_end (ThriftProtocol *protocol, GError **error); - -gint32 thrift_protocol_read_set_begin (ThriftProtocol *protocol, - ThriftType *element_type, - guint32 *size, GError **error); - -gint32 thrift_protocol_read_set_end (ThriftProtocol *protocol, GError **error); - -gint32 thrift_protocol_read_bool (ThriftProtocol *protocol, gboolean *value, - GError **error); - -gint32 thrift_protocol_read_byte (ThriftProtocol *protocol, gint8 *value, - GError **error); - -gint32 thrift_protocol_read_i16 (ThriftProtocol *protocol, gint16 *value, - GError **error); - -gint32 thrift_protocol_read_i32 (ThriftProtocol *protocol, gint32 *value, - GError **error); - -gint32 thrift_protocol_read_i64 (ThriftProtocol *protocol, gint64 *value, - GError **error); - -gint32 thrift_protocol_read_double (ThriftProtocol *protocol, - gdouble *value, GError **error); - -gint32 thrift_protocol_read_string (ThriftProtocol *protocol, - gchar **str, GError **error); - -gint32 thrift_protocol_read_binary (ThriftProtocol *protocol, - gpointer *buf, guint32 *len, - GError **error); - -gint32 thrift_protocol_skip (ThriftProtocol *protocol, ThriftType type, - GError **error); - -/* define error types */ -typedef enum -{ - THRIFT_PROTOCOL_ERROR_UNKNOWN, - THRIFT_PROTOCOL_ERROR_INVALID_DATA, - THRIFT_PROTOCOL_ERROR_NEGATIVE_SIZE, - THRIFT_PROTOCOL_ERROR_SIZE_LIMIT, - THRIFT_PROTOCOL_ERROR_BAD_VERSION, - THRIFT_PROTOCOL_ERROR_NOT_IMPLEMENTED, - THRIFT_PROTOCOL_ERROR_DEPTH_LIMIT -} ThriftProtocolError; - -/* define an error domain for GError to use */ -GQuark thrift_protocol_error_quark (void); -#define THRIFT_PROTOCOL_ERROR (thrift_protocol_error_quark ()) - -G_END_DECLS - -#endif /* _THRIFT_PROTOCOL_H */ http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.c ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.c b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.c deleted file mode 100644 index bef4087..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include -#include - -G_DEFINE_ABSTRACT_TYPE(ThriftProtocolFactory, thrift_protocol_factory, G_TYPE_OBJECT) - -ThriftProtocol * -thrift_protocol_factory_get_protocol(ThriftProtocolFactory *factory, - ThriftTransport *transport) -{ - return THRIFT_PROTOCOL_FACTORY_GET_CLASS (factory)->get_protocol (factory, - transport); -} - -static void -thrift_protocol_factory_init (ThriftProtocolFactory *factory) -{ - THRIFT_UNUSED_VAR (factory); -} - -static void -thrift_protocol_factory_class_init (ThriftProtocolFactoryClass *cls) -{ - cls->get_protocol = thrift_protocol_factory_get_protocol; -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h deleted file mode 100644 index 5f146dd..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_FACTORY_H -#define _THRIFT_PROTOCOL_FACTORY_H - -#include - -#include -#include - -G_BEGIN_DECLS - -/*! \file thrift_protocol_factory.h - * \brief Abstract class for Thrift protocol factory implementations. - */ - -/* type macros */ -#define THRIFT_TYPE_PROTOCOL_FACTORY (thrift_protocol_factory_get_type ()) -#define THRIFT_PROTOCOL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THRIFT_TYPE_PROTOCOL_FACTORY, ThriftProtocolFactory)) -#define THRIFT_IS_PROTOCOL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THRIFT_TYPE_PROTOCOL_FACTORY)) -#define THRIFT_PROTOCOL_FACTORY_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), THRIFT_TYPE_PROTOCOL_FACTORY, ThriftProtocolFactoryClass)) -#define THRIFT_IS_PROTOCOL_FACTORY_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_PROTOCOL_FACTORY)) -#define THRIFT_PROTOCOL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_PROTOCOL_FACTORY, ThriftProtocolFactoryClass)) - -typedef struct _ThriftProtocolFactory ThriftProtocolFactory; - -/*! - * Thrift Protocol Factory object - */ -struct _ThriftProtocolFactory -{ - GObject parent; -}; - -typedef struct _ThriftProtocolFactoryClass ThriftProtocolFactoryClass; - -/*! - * Thrift Protocol Factory class - */ -struct _ThriftProtocolFactoryClass -{ - GObjectClass parent; - - ThriftProtocol *(*get_protocol) (ThriftProtocolFactory *factory, - ThriftTransport *transport); -}; - -/* used by THRIFT_TYPE_PROTOCOL_FACTORY */ -GType thrift_protocol_factory_get_type (void); - -/* virtual public methods */ -ThriftProtocol *thrift_protocol_factory_get_protocol(ThriftProtocolFactory *factory, ThriftTransport *transport); - -G_END_DECLS - -#endif /* _THRIFT_PROTOCOL_FACTORY_H */ http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.c ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.c b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.c deleted file mode 100644 index e8aff45..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include -#include "thrift_server.h" - -/* object properties */ -enum _ThriftServerProperties -{ - PROP_0, - PROP_THRIFT_SERVER_PROCESSOR, - PROP_THRIFT_SERVER_SERVER_TRANSPORT, - PROP_THRIFT_SERVER_INPUT_TRANSPORT_FACTORY, - PROP_THRIFT_SERVER_OUTPUT_TRANSPORT_FACTORY, - PROP_THRIFT_SERVER_INPUT_PROTOCOL_FACTORY, - PROP_THRIFT_SERVER_OUTPUT_PROTOCOL_FACTORY -}; - -G_DEFINE_ABSTRACT_TYPE(ThriftServer, thrift_server, G_TYPE_OBJECT) - -void -thrift_server_get_property (GObject *object, guint property_id, - GValue *value, GParamSpec *pspec) -{ - ThriftServer *server = THRIFT_SERVER (object); - - THRIFT_UNUSED_VAR (pspec); - - switch (property_id) - { - case PROP_THRIFT_SERVER_PROCESSOR: - g_value_set_object (value, server->processor); - break; - case PROP_THRIFT_SERVER_SERVER_TRANSPORT: - g_value_set_object (value, server->server_transport); - break; - case PROP_THRIFT_SERVER_INPUT_TRANSPORT_FACTORY: - g_value_set_object (value, server->input_transport_factory); - break; - case PROP_THRIFT_SERVER_OUTPUT_TRANSPORT_FACTORY: - g_value_set_object (value, server->output_transport_factory); - break; - case PROP_THRIFT_SERVER_INPUT_PROTOCOL_FACTORY: - g_value_set_object (value, server->input_protocol_factory); - break; - case PROP_THRIFT_SERVER_OUTPUT_PROTOCOL_FACTORY: - g_value_set_object (value, server->output_protocol_factory); - break; - } -} - -void -thrift_server_set_property (GObject *object, guint property_id, - const GValue *value, GParamSpec *pspec) -{ - ThriftServer *server = THRIFT_SERVER (object); - - THRIFT_UNUSED_VAR (pspec); - - switch (property_id) - { - case PROP_THRIFT_SERVER_PROCESSOR: - server->processor = g_value_get_object (value); - break; - case PROP_THRIFT_SERVER_SERVER_TRANSPORT: - server->server_transport = g_value_get_object (value); - break; - case PROP_THRIFT_SERVER_INPUT_TRANSPORT_FACTORY: - server->input_transport_factory = g_value_get_object (value); - break; - case PROP_THRIFT_SERVER_OUTPUT_TRANSPORT_FACTORY: - server->output_transport_factory = g_value_get_object (value); - break; - case PROP_THRIFT_SERVER_INPUT_PROTOCOL_FACTORY: - server->input_protocol_factory = g_value_get_object (value); - break; - case PROP_THRIFT_SERVER_OUTPUT_PROTOCOL_FACTORY: - server->output_protocol_factory = g_value_get_object (value); - break; - } -} - -gboolean -thrift_server_serve (ThriftServer *server, GError **error) -{ - return THRIFT_SERVER_GET_CLASS (server)->serve (server, error); -} - -void -thrift_server_stop (ThriftServer *server) -{ - THRIFT_SERVER_GET_CLASS (server)->stop (server); -} - -/* instance initializer for Thrift Server */ -static void -thrift_server_init (ThriftServer *server) -{ - server->processor = NULL; - server->server_transport = NULL; - server->input_transport_factory = NULL; - server->output_transport_factory = NULL; - server->input_protocol_factory = NULL; - server->output_protocol_factory = NULL; -} - -/* class initializer for ThriftServer - * TODO: implement ServerEventHandler as a GClosure - */ -static void -thrift_server_class_init (ThriftServerClass *cls) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (cls); - - gobject_class->get_property = thrift_server_get_property; - gobject_class->set_property = thrift_server_set_property; - - g_object_class_install_property (gobject_class, - PROP_THRIFT_SERVER_PROCESSOR, - g_param_spec_object ("processor", "Processor", "Thrift Processor", - THRIFT_TYPE_PROCESSOR, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (gobject_class, - PROP_THRIFT_SERVER_SERVER_TRANSPORT, - g_param_spec_object ("server_transport", "Server Transport", - "Thrift Server Transport", - THRIFT_TYPE_SERVER_TRANSPORT, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (gobject_class, - PROP_THRIFT_SERVER_INPUT_TRANSPORT_FACTORY, - g_param_spec_object ("input_transport_factory", "Input Transport Factory", - "Thrift Server Input Transport Factory", - THRIFT_TYPE_TRANSPORT_FACTORY, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (gobject_class, - PROP_THRIFT_SERVER_OUTPUT_TRANSPORT_FACTORY, - g_param_spec_object ("output_transport_factory", - "Output Transport Factory", - "Thrift Server Output Transport Factory", - THRIFT_TYPE_TRANSPORT_FACTORY, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (gobject_class, - PROP_THRIFT_SERVER_INPUT_PROTOCOL_FACTORY, - g_param_spec_object ("input_protocol_factory", "Input Protocol Factory", - "Thrift Server Input Protocol Factory", - THRIFT_TYPE_PROTOCOL_FACTORY, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (gobject_class, - PROP_THRIFT_SERVER_OUTPUT_PROTOCOL_FACTORY, - g_param_spec_object ("output_protocol_factory", "Output Protocol Factory", - "Thrift Server Output Protocol Factory", - THRIFT_TYPE_PROTOCOL_FACTORY, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - /* set these as virtual methods to be implemented by a subclass */ - cls->serve = thrift_server_serve; - cls->stop = thrift_server_stop; -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.h ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.h b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.h deleted file mode 100644 index 49beddc..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_server.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_SERVER_H -#define _THRIFT_SERVER_H - -#include - -#include -#include -#include -#include - -G_BEGIN_DECLS - -/*! \file thrift_server.h - * \brief Abstract class for Thrift servers. - */ - -/* type macros */ -#define THRIFT_TYPE_SERVER (thrift_server_get_type ()) -#define THRIFT_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THRIFT_TYPE_SERVER, ThriftServer)) -#define THRIFT_IS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THRIFT_TYPE_SERVER)) -#define THRIFT_SERVER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), THRIFT_TYPE_SERVER, ThriftServerClass)) -#define THRIFT_IS_SERVER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_SERVER)) -#define THRIFT_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_SERVER, ThriftServerClass)) - -typedef struct _ThriftServer ThriftServer; - -/*! - * Thrift Server object - */ -struct _ThriftServer -{ - GObject parent; - - /* protected */ - ThriftProcessor *processor; - ThriftServerTransport *server_transport; - ThriftTransportFactory *input_transport_factory; - ThriftTransportFactory *output_transport_factory; - ThriftProtocolFactory *input_protocol_factory; - ThriftProtocolFactory *output_protocol_factory; -}; - -typedef struct _ThriftServerClass ThriftServerClass; - -/*! - * Thrift Server class - */ -struct _ThriftServerClass -{ - GObjectClass parent; - - /* vtable */ - gboolean (*serve) (ThriftServer *server, GError **error); - void (*stop) (ThriftServer *server); -}; - -/* used by THRIFT_TYPE_SERVER */ -GType thrift_server_get_type (void); - -/*! - * Processes the request. - * \public \memberof ThriftServerClass - */ -gboolean thrift_server_serve (ThriftServer *server, GError **error); - -/*! - * Stop handling requests. - */ -void thrift_server_stop (ThriftServer *server); - -G_END_DECLS - -#endif /* _THRIFT_SERVER_H */ - http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c deleted file mode 100644 index 22a96c7..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include -#include -#include -#include - -G_DEFINE_TYPE(ThriftSimpleServer, thrift_simple_server, THRIFT_TYPE_SERVER) - -gboolean -thrift_simple_server_serve (ThriftServer *server, GError **error) -{ - ThriftTransport *t = NULL; - ThriftTransport *input_transport = NULL, *output_transport = NULL; - ThriftProtocol *input_protocol = NULL, *output_protocol = NULL; - ThriftSimpleServer *tss = THRIFT_SIMPLE_SERVER(server); - GError *process_error = NULL; - - g_return_val_if_fail (THRIFT_IS_SIMPLE_SERVER (server), FALSE); - - if (thrift_server_transport_listen (server->server_transport, error)) { - tss->running = TRUE; - while (tss->running == TRUE) - { - t = thrift_server_transport_accept (server->server_transport, - error); - if (t != NULL && tss->running) { - input_transport = - THRIFT_TRANSPORT_FACTORY_GET_CLASS (server->input_transport_factory) - ->get_transport (server->input_transport_factory, t); - output_transport = - THRIFT_TRANSPORT_FACTORY_GET_CLASS (server->output_transport_factory) - ->get_transport (server->output_transport_factory, t); - input_protocol = - THRIFT_PROTOCOL_FACTORY_GET_CLASS (server->input_protocol_factory) - ->get_protocol (server->input_protocol_factory, input_transport); - output_protocol = - THRIFT_PROTOCOL_FACTORY_GET_CLASS (server->output_protocol_factory) - ->get_protocol (server->output_protocol_factory, output_transport); - - while (THRIFT_PROCESSOR_GET_CLASS (server->processor) - ->process (server->processor, - input_protocol, - output_protocol, - &process_error) && - thrift_transport_peek (input_transport, &process_error)) - { - } - - if (process_error != NULL) - { - g_message ("thrift_simple_server_serve: %s", process_error->message); - g_clear_error (&process_error); - - /* Note we do not propagate processing errors to the caller as they - * normally are transient and not fatal to the server */ - } - - /* TODO: handle exceptions */ - THRIFT_TRANSPORT_GET_CLASS (input_transport)->close (input_transport, - NULL); - THRIFT_TRANSPORT_GET_CLASS (output_transport)->close (output_transport, - NULL); - } - } - - /* attempt to shutdown */ - THRIFT_SERVER_TRANSPORT_GET_CLASS (server->server_transport) - ->close (server->server_transport, NULL); - } - - /* Since this method is designed to run forever, it can only ever return on - * error */ - return FALSE; -} - -void -thrift_simple_server_stop (ThriftServer *server) -{ - g_return_if_fail (THRIFT_IS_SIMPLE_SERVER (server)); - (THRIFT_SIMPLE_SERVER (server))->running = FALSE; -} - -static void -thrift_simple_server_init (ThriftSimpleServer *tss) -{ - ThriftServer *server = THRIFT_SERVER(tss); - - tss->running = FALSE; - - if (server->input_transport_factory == NULL) - { - server->input_transport_factory = - g_object_new (THRIFT_TYPE_TRANSPORT_FACTORY, NULL); - } - if (server->output_transport_factory == NULL) - { - server->output_transport_factory = - g_object_new (THRIFT_TYPE_TRANSPORT_FACTORY, NULL); - } - if (server->input_protocol_factory == NULL) - { - server->input_protocol_factory = - g_object_new (THRIFT_TYPE_BINARY_PROTOCOL_FACTORY, NULL); - } - if (server->output_protocol_factory == NULL) - { - server->output_protocol_factory = - g_object_new (THRIFT_TYPE_BINARY_PROTOCOL_FACTORY, NULL); - } -} - -/* initialize the class */ -static void -thrift_simple_server_class_init (ThriftSimpleServerClass *class) -{ - ThriftServerClass *cls = THRIFT_SERVER_CLASS(class); - - cls->serve = thrift_simple_server_serve; - cls->stop = thrift_simple_server_stop; -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h deleted file mode 100644 index 86b538b..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_SIMPLE_SERVER_H -#define _THRIFT_SIMPLE_SERVER_H - -#include - -#include - -G_BEGIN_DECLS - -/*! \file thrift_simple_server.h - * \brief A simple Thrift server, single-threaded. - */ - -/* type macros */ -#define THRIFT_TYPE_SIMPLE_SERVER (thrift_simple_server_get_type ()) -#define THRIFT_SIMPLE_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THRIFT_TYPE_SIMPLE_SERVER, ThriftSimpleServer)) -#define THRIFT_IS_SIMPLE_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THRIFT_TYPE_SIMPLE_SERVER)) -#define THRIFT_SIMPLE_SERVER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c) THRIFT_TYPE_SIMPLE_SERVER, ThriftSimpleServerClass)) -#define THRIFT_IS_SIMPLE_SERVER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_SIMPLE_SERVER)) -#define THRIFT_SIMPLE_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_SIMPLE_SERVER, ThriftSimpleServerClass)) - -typedef struct _ThriftSimpleServer ThriftSimpleServer; - -/** - * Thrift Simple Server instance. - */ -struct _ThriftSimpleServer -{ - ThriftServer parent; - - /* private */ - volatile gboolean running; -}; - -typedef struct _ThriftSimpleServerClass ThriftSimpleServerClass; - -/** - * Thrift Simple Server class. - */ -struct _ThriftSimpleServerClass -{ - ThriftServerClass parent; -}; - -/* used by THRIFT_TYPE_SIMPLE_SERVER */ -GType thrift_simple_server_get_type (void); - -G_END_DECLS - -#endif /* _THRIFT_SIMPLE_SERVER_H */ - http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.c ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.c b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.c deleted file mode 100644 index 15f409f..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include - -/** - * GHashTable callback to add keys to a GList. - */ -void -thrift_hash_table_get_keys (gpointer key, gpointer value, gpointer user_data) -{ - GList **list = (GList **) user_data; - - THRIFT_UNUSED_VAR (value); - - *list = g_list_append (*list, key); -} - -void -thrift_string_free (gpointer str) -{ - GByteArray* ptr = str; - g_byte_array_unref(ptr); -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.h ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.h b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.h deleted file mode 100644 index 858ad86..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_H -#define _THRIFT_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -/* this macro is called to satisfy -Wall hardcore compilation */ -#ifndef THRIFT_UNUSED_VAR -# define THRIFT_UNUSED_VAR(x) ((void) x) -#endif - -void thrift_hash_table_get_keys (gpointer key, gpointer value, - gpointer user_data); -void thrift_string_free (gpointer str); - -#endif /* #ifndef _THRIFT_THRIFT_H */ http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.c ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.c b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.c deleted file mode 100644 index 1234cae..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.c +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include "thrift_application_exception.h" -#include - -/* object properties */ -enum _ThriftApplicationExceptionProperties -{ - PROP_0, - PROP_THRIFT_APPLICATION_EXCEPTION_TYPE, - PROP_THRIFT_APPLICATION_EXCEPTION_MESSAGE -}; - -G_DEFINE_TYPE(ThriftApplicationException, thrift_application_exception, THRIFT_TYPE_STRUCT) - -gint32 -thrift_application_exception_read (ThriftStruct *object, - ThriftProtocol *protocol, GError **error) -{ - gint32 ret; - gint32 xfer = 0; - gchar *name; - ThriftType ftype; - gint16 fid; - ThriftApplicationException *this = THRIFT_APPLICATION_EXCEPTION (object); - - /* read the struct begin marker */ - if ((ret = thrift_protocol_read_struct_begin (protocol, &name, error)) < 0) - { - if (name) g_free (name); - return -1; - } - xfer += ret; - if (name) g_free (name); - - while (1) - { - if ((ret = thrift_protocol_read_field_begin (protocol, &name, &ftype, - &fid, error)) < 0) - { - if (name) g_free (name); - return -1; - } - xfer += ret; - if (name) g_free (name); - - /* break if we get a STOP field */ - if (ftype == T_STOP) - { - break; - } - - switch (fid) - { - case 1: - if (ftype == T_STRING) - { - if ((ret = thrift_protocol_read_string (protocol, &this->message, - error)) < 0) - return -1; - xfer += ret; - this->__isset_message = TRUE; - } else { - if ((ret = thrift_protocol_skip (protocol, ftype, error)) < 0) - return -1; - xfer += ret; - } - break; - case 2: - if (ftype == T_I32) - { - if ((ret = thrift_protocol_read_i32 (protocol, &this->type, - error)) < 0) - return -1; - xfer += ret; - this->__isset_type = TRUE; - } else { - if ((ret = thrift_protocol_skip (protocol, ftype, error)) < 0) - return -1; - xfer += ret; - } - break; - default: - if ((ret = thrift_protocol_skip (protocol, ftype, error)) < 0) - return -1; - xfer += ret; - break; - } - if ((ret = thrift_protocol_read_field_end (protocol, error)) < 0) - return -1; - xfer += ret; - } - - if ((ret = thrift_protocol_read_struct_end (protocol, error)) < 0) - return -1; - xfer += ret; - - return xfer; -} - -gint32 -thrift_application_exception_write (ThriftStruct *object, - ThriftProtocol *protocol, GError **error) -{ - gint32 ret; - gint32 xfer = 0; - - ThriftApplicationException *this = THRIFT_APPLICATION_EXCEPTION (object); - - if ((ret = thrift_protocol_write_struct_begin (protocol, - "TApplicationException", - error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_field_begin (protocol, "message", - T_STRING, 1, error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_string (protocol, this->message, error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_field_begin (protocol, "type", - T_I32, 2, error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_i32 (protocol, this->type, error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_field_stop (protocol, error)) < 0) - return -1; - xfer += ret; - if ((ret = thrift_protocol_write_struct_end (protocol, error)) < 0) - return -1; - xfer += ret; - - return xfer; -} - - -/* GError domain */ -#define THRIFT_APPLICATION_EXCEPTION_ERROR_DOMAIN "thrift-application-exception-error-quark" - -GQuark -thrift_application_exception_error_quark (void) -{ - return g_quark_from_static_string (THRIFT_APPLICATION_EXCEPTION_ERROR_DOMAIN); -} - -static void -thrift_application_exception_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) -{ - ThriftApplicationException *tae = THRIFT_APPLICATION_EXCEPTION (object); - - switch (property_id) - { - case PROP_THRIFT_APPLICATION_EXCEPTION_TYPE: - g_value_set_int (value, tae->type); - break; - case PROP_THRIFT_APPLICATION_EXCEPTION_MESSAGE: - g_value_set_string (value, tae->message); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -static void -thrift_application_exception_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - ThriftApplicationException *tae = THRIFT_APPLICATION_EXCEPTION (object); - - switch (property_id) - { - case PROP_THRIFT_APPLICATION_EXCEPTION_TYPE: - tae->type = g_value_get_int (value); - tae->__isset_type = TRUE; - break; - case PROP_THRIFT_APPLICATION_EXCEPTION_MESSAGE: - if (tae->message != NULL) - g_free (tae->message); - - tae->message = g_value_dup_string (value); - tae->__isset_message = TRUE; - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -void -thrift_application_exception_init (ThriftApplicationException *object) -{ - object->type = 0; - object->__isset_type = FALSE; - object->message = NULL; - object->__isset_message = FALSE; -} - -void -thrift_application_exception_finalize (GObject *object) -{ - ThriftApplicationException *tae = THRIFT_APPLICATION_EXCEPTION (object); - - if (tae->__isset_message) { - g_free(tae->message); - } -} - -void -thrift_application_exception_class_init (ThriftApplicationExceptionClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS(class); - ThriftStructClass *cls = THRIFT_STRUCT_CLASS(class); - GParamSpec *param_spec; - - cls->read = thrift_application_exception_read; - cls->write = thrift_application_exception_write; - - gobject_class->finalize = thrift_application_exception_finalize; - gobject_class->get_property = thrift_application_exception_get_property; - gobject_class->set_property = thrift_application_exception_set_property; - - param_spec = g_param_spec_int ("type", - "Exception type", - "The type of the exception, one of the " - "values defined by the " - "ThriftApplicationExceptionError " - "enumeration.", - 0, - THRIFT_APPLICATION_EXCEPTION_ERROR_N - 1, - 0, - G_PARAM_READWRITE); - g_object_class_install_property (gobject_class, - PROP_THRIFT_APPLICATION_EXCEPTION_TYPE, - param_spec); - - param_spec = g_param_spec_string ("message", - "Exception message", - "A string describing the exception that " - "occurred.", - NULL, - G_PARAM_READWRITE); - g_object_class_install_property (gobject_class, - PROP_THRIFT_APPLICATION_EXCEPTION_MESSAGE, - param_spec); -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h deleted file mode 100644 index 733f793..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_APPLICATION_EXCEPTION_H -#define _THRIFT_APPLICATION_EXCEPTION_H - -#include -#include "thrift_struct.h" - -G_BEGIN_DECLS - -/*! \file thrift_application_exception.h - * \brief C Implementation of a TApplicationException. - */ - -/* type macros */ -#define THRIFT_TYPE_APPLICATION_EXCEPTION (thrift_application_exception_get_type ()) -#define THRIFT_APPLICATION_EXCEPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THRIFT_TYPE_APPLICATION_EXCEPTION, ThriftApplicationException)) -#define THRIFT_IS_APPLICATION_EXCEPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THRIFT_TYPE_APPLICATION_EXCEPTION)) -#define THRIFT_APPLICATION_EXCEPTION_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), THRIFT_TYPE_APPLICATION_EXCEPTION, ThriftApplicationExceptionClass)) -#define THRIFT_IS_APPLICATION_EXCEPTION_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_APPLICATION_EXCEPTION)) -#define THRIFT_APPLICATION_EXCEPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_APPLICATION_EXCEPTION, ThriftApplicationExceptionClass)) - -typedef struct _ThriftApplicationException ThriftApplicationException; - -struct _ThriftApplicationException -{ - ThriftStruct parent; - - /* private */ - gint32 type; - gboolean __isset_type; - gchar *message; - gboolean __isset_message; -}; - -typedef struct _ThriftApplicationExceptionClass ThriftApplicationExceptionClass; - -struct _ThriftApplicationExceptionClass -{ - ThriftStructClass parent; -}; - -GType thrift_application_exception_get_type (void); - -/* gerror codes */ -typedef enum -{ - THRIFT_APPLICATION_EXCEPTION_ERROR_UNKNOWN, - THRIFT_APPLICATION_EXCEPTION_ERROR_UNKNOWN_METHOD, - THRIFT_APPLICATION_EXCEPTION_ERROR_INVALID_MESSAGE_TYPE, - THRIFT_APPLICATION_EXCEPTION_ERROR_WRONG_METHOD_NAME, - THRIFT_APPLICATION_EXCEPTION_ERROR_BAD_SEQUENCE_ID, - THRIFT_APPLICATION_EXCEPTION_ERROR_MISSING_RESULT, - THRIFT_APPLICATION_EXCEPTION_ERROR_INTERNAL_ERROR, - THRIFT_APPLICATION_EXCEPTION_ERROR_PROTOCOL_ERROR, - THRIFT_APPLICATION_EXCEPTION_ERROR_INVALID_TRANSFORM, - THRIFT_APPLICATION_EXCEPTION_ERROR_INVALID_PROTOCOL, - THRIFT_APPLICATION_EXCEPTION_ERROR_UNSUPPORTED_CLIENT_TYPE, - - THRIFT_APPLICATION_EXCEPTION_ERROR_N -} ThriftApplicationExceptionError; - -/* define error domain for GError */ -GQuark thrift_application_exception_error_quark (void); -#define THRIFT_APPLICATION_EXCEPTION_ERROR (thrift_application_exception_error_quark ()) - -G_END_DECLS - -#endif /* _THRIFT_APPLICATION_EXCEPTION_H */ http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.c ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.c b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.c deleted file mode 100644 index f24f2a1..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include -#include "thrift_struct.h" - -G_DEFINE_ABSTRACT_TYPE(ThriftStruct, thrift_struct, G_TYPE_OBJECT) - -gint32 -thrift_struct_read (ThriftStruct *object, ThriftProtocol *protocol, - GError **error) -{ - g_return_val_if_fail (THRIFT_IS_STRUCT (object), -1); - return THRIFT_STRUCT_GET_CLASS (object)->read (object, protocol, error); -} - -gint32 -thrift_struct_write (ThriftStruct *object, ThriftProtocol *protocol, - GError **error) -{ - g_return_val_if_fail (THRIFT_IS_STRUCT (object), -1); - return THRIFT_STRUCT_GET_CLASS (object)->write (object, protocol, error); -} - -static void -thrift_struct_class_init (ThriftStructClass *cls) -{ - cls->read = thrift_struct_read; - cls->write = thrift_struct_write; -} - -static void -thrift_struct_init (ThriftStruct *structure) -{ - THRIFT_UNUSED_VAR (structure); -} http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/72ea8afd/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.h ---------------------------------------------------------------------- diff --git a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.h b/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.h deleted file mode 100644 index f4cfcb2..0000000 --- a/depends/thirdparty/thrift/lib/c_glib/src/thrift/c_glib/thrift_struct.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef THRIFT_STRUCT_H -#define THRIFT_STRUCT_H - -#include - -#include - -G_BEGIN_DECLS - -#define THRIFT_TYPE_STRUCT (thrift_struct_get_type ()) -#define THRIFT_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THRIFT_TYPE_STRUCT, ThriftStruct)) -#define THRIFT_STRUCT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), THRIFT_TYPE_STRUCT, ThriftStructClass)) -#define THRIFT_IS_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THRIFT_TYPE_STRUCT)) -#define THRIFT_IS_STRUCT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_STRUCT)) -#define THRIFT_STRUCT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_STRUCT, ThriftStructClass)) - -typedef struct _ThriftStruct ThriftStruct; - -/* struct */ -struct _ThriftStruct -{ - GObject parent; - - /* private */ -}; - -typedef struct _ThriftStructClass ThriftStructClass; - -struct _ThriftStructClass -{ - GObjectClass parent; - - /* public */ - gint32 (*read) (ThriftStruct *object, ThriftProtocol *protocol, - GError **error); - gint32 (*write) (ThriftStruct *object, ThriftProtocol *protocol, - GError **error); -}; - -GType thrift_struct_get_type (void); - -gint32 thrift_struct_read (ThriftStruct *object, ThriftProtocol *protocol, - GError **error); - -gint32 thrift_struct_write (ThriftStruct *object, ThriftProtocol *protocol, - GError **error); -G_END_DECLS - -#endif