Back to index

libunity  5.92.0
unity-scope-proxy.c
Go to the documentation of this file.
00001 /* unity-scope-proxy.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-scope-proxy.vala, do not modify */
00003 
00004 /*
00005  * Copyright (C) 2011 Canonical, Ltd.
00006  *
00007  * This library is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License
00009  * version 3.0 as published by the Free Software Foundation.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License version 3.0 for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library. If not, see
00018  * <http://www.gnu.org/licenses/>.
00019  *
00020  * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
00021  *
00022  */
00023 
00024 #include <glib.h>
00025 #include <glib-object.h>
00026 #include <gio/gio.h>
00027 #include <stdlib.h>
00028 #include <string.h>
00029 #include <unity-protocol.h>
00030 #include "unity.h"
00031 #include <dee.h>
00032 
00033 
00034 #define UNITY_TYPE_SCOPE_PROXY (unity_scope_proxy_get_type ())
00035 #define UNITY_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxy))
00036 #define UNITY_IS_SCOPE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY))
00037 #define UNITY_SCOPE_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxyIface))
00038 
00039 typedef struct _UnityScopeProxy UnityScopeProxy;
00040 typedef struct _UnityScopeProxyIface UnityScopeProxyIface;
00041 
00042 struct _UnityScopeProxyIface {
00043        GTypeInterface parent_iface;
00044        void (*activate) (UnityScopeProxy* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00045        void (*activate_finish) (UnityScopeProxy* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result);
00046        void (*update_preview_property) (UnityScopeProxy* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00047        GHashTable* (*update_preview_property_finish) (UnityScopeProxy* self, GAsyncResult* _res_, GError** error);
00048        void (*search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00049        GHashTable* (*search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00050        void (*global_search) (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00051        GHashTable* (*global_search_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00052        void (*set_active_sources) (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00053        void (*set_active_sources_finish) (UnityScopeProxy* self, GAsyncResult* _res_);
00054        UnityOptionsFilter* (*get_sources) (UnityScopeProxy* self);
00055        void (*set_sources) (UnityScopeProxy* self, UnityOptionsFilter* value);
00056        gboolean (*get_search_in_global) (UnityScopeProxy* self);
00057        void (*set_search_in_global) (UnityScopeProxy* self, gboolean value);
00058        UnityProtocolViewType (*get_view_type) (UnityScopeProxy* self);
00059        void (*set_view_type) (UnityScopeProxy* self, UnityProtocolViewType value);
00060        DeeSerializableModel* (*get_results_model) (UnityScopeProxy* self);
00061        void (*set_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00062        DeeSerializableModel* (*get_global_results_model) (UnityScopeProxy* self);
00063        void (*set_global_results_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00064        DeeSerializableModel* (*get_filters_model) (UnityScopeProxy* self);
00065        void (*set_filters_model) (UnityScopeProxy* self, DeeSerializableModel* value);
00066 };
00067 
00068 
00069 
00070 GType unity_scope_proxy_get_type (void) G_GNUC_CONST;
00071 void unity_scope_proxy_activate (UnityScopeProxy* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
00072 void unity_scope_proxy_activate_finish (UnityScopeProxy* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result);
00073 void unity_scope_proxy_update_preview_property (UnityScopeProxy* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_);
00074 GHashTable* unity_scope_proxy_update_preview_property_finish (UnityScopeProxy* self, GAsyncResult* _res_, GError** error);
00075 void unity_scope_proxy_search (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00076 GHashTable* unity_scope_proxy_search_finish (UnityScopeProxy* self, GAsyncResult* _res_);
00077 void unity_scope_proxy_global_search (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_);
00078 GHashTable* unity_scope_proxy_global_search_finish (UnityScopeProxy* self, GAsyncResult* _res_);
00079 void unity_scope_proxy_set_active_sources (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
00080 void unity_scope_proxy_set_active_sources_finish (UnityScopeProxy* self, GAsyncResult* _res_);
00081 UnityOptionsFilter* unity_scope_proxy_get_sources (UnityScopeProxy* self);
00082 void unity_scope_proxy_set_sources (UnityScopeProxy* self, UnityOptionsFilter* value);
00083 gboolean unity_scope_proxy_get_search_in_global (UnityScopeProxy* self);
00084 void unity_scope_proxy_set_search_in_global (UnityScopeProxy* self, gboolean value);
00085 UnityProtocolViewType unity_scope_proxy_get_view_type (UnityScopeProxy* self);
00086 void unity_scope_proxy_set_view_type (UnityScopeProxy* self, UnityProtocolViewType value);
00087 DeeSerializableModel* unity_scope_proxy_get_results_model (UnityScopeProxy* self);
00088 void unity_scope_proxy_set_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
00089 DeeSerializableModel* unity_scope_proxy_get_global_results_model (UnityScopeProxy* self);
00090 void unity_scope_proxy_set_global_results_model (UnityScopeProxy* self, DeeSerializableModel* value);
00091 DeeSerializableModel* unity_scope_proxy_get_filters_model (UnityScopeProxy* self);
00092 void unity_scope_proxy_set_filters_model (UnityScopeProxy* self, DeeSerializableModel* value);
00093 
00094 
00095 void unity_scope_proxy_activate (UnityScopeProxy* self, const gchar* uri, UnityProtocolActionType action_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00096        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->activate (self, uri, action_type, _callback_, _user_data_);
00097 }
00098 
00099 
00100 void unity_scope_proxy_activate_finish (UnityScopeProxy* self, GAsyncResult* _res_, UnityProtocolActivationReplyRaw* result) {
00101        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->activate_finish (self, _res_, result);
00102 }
00103 
00104 
00105 void unity_scope_proxy_update_preview_property (UnityScopeProxy* self, const gchar* uri, GHashTable* values, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00106        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->update_preview_property (self, uri, values, _callback_, _user_data_);
00107 }
00108 
00109 
00110 GHashTable* unity_scope_proxy_update_preview_property_finish (UnityScopeProxy* self, GAsyncResult* _res_, GError** error) {
00111        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->update_preview_property_finish (self, _res_, error);
00112 }
00113 
00114 
00115 void unity_scope_proxy_search (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00116        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->search (self, search_string, hints, _callback_, _user_data_);
00117 }
00118 
00119 
00120 GHashTable* unity_scope_proxy_search_finish (UnityScopeProxy* self, GAsyncResult* _res_) {
00121        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->search_finish (self, _res_);
00122 }
00123 
00124 
00125 void unity_scope_proxy_global_search (UnityScopeProxy* self, const gchar* search_string, GHashTable* hints, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00126        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->global_search (self, search_string, hints, _callback_, _user_data_);
00127 }
00128 
00129 
00130 GHashTable* unity_scope_proxy_global_search_finish (UnityScopeProxy* self, GAsyncResult* _res_) {
00131        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->global_search_finish (self, _res_);
00132 }
00133 
00134 
00135 void unity_scope_proxy_set_active_sources (UnityScopeProxy* self, gchar** sources, int sources_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00136        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_active_sources (self, sources, sources_length1, _callback_, _user_data_);
00137 }
00138 
00139 
00140 void unity_scope_proxy_set_active_sources_finish (UnityScopeProxy* self, GAsyncResult* _res_) {
00141        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_active_sources_finish (self, _res_);
00142 }
00143 
00144 
00145 UnityOptionsFilter* unity_scope_proxy_get_sources (UnityScopeProxy* self) {
00146        g_return_val_if_fail (self != NULL, NULL);
00147        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->get_sources (self);
00148 }
00149 
00150 
00151 void unity_scope_proxy_set_sources (UnityScopeProxy* self, UnityOptionsFilter* value) {
00152        g_return_if_fail (self != NULL);
00153        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_sources (self, value);
00154 }
00155 
00156 
00157 gboolean unity_scope_proxy_get_search_in_global (UnityScopeProxy* self) {
00158        g_return_val_if_fail (self != NULL, FALSE);
00159        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->get_search_in_global (self);
00160 }
00161 
00162 
00163 void unity_scope_proxy_set_search_in_global (UnityScopeProxy* self, gboolean value) {
00164        g_return_if_fail (self != NULL);
00165        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_search_in_global (self, value);
00166 }
00167 
00168 
00169 UnityProtocolViewType unity_scope_proxy_get_view_type (UnityScopeProxy* self) {
00170        g_return_val_if_fail (self != NULL, 0);
00171        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->get_view_type (self);
00172 }
00173 
00174 
00175 void unity_scope_proxy_set_view_type (UnityScopeProxy* self, UnityProtocolViewType value) {
00176        g_return_if_fail (self != NULL);
00177        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_view_type (self, value);
00178 }
00179 
00180 
00181 DeeSerializableModel* unity_scope_proxy_get_results_model (UnityScopeProxy* self) {
00182        g_return_val_if_fail (self != NULL, NULL);
00183        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->get_results_model (self);
00184 }
00185 
00186 
00187 void unity_scope_proxy_set_results_model (UnityScopeProxy* self, DeeSerializableModel* value) {
00188        g_return_if_fail (self != NULL);
00189        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_results_model (self, value);
00190 }
00191 
00192 
00193 DeeSerializableModel* unity_scope_proxy_get_global_results_model (UnityScopeProxy* self) {
00194        g_return_val_if_fail (self != NULL, NULL);
00195        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->get_global_results_model (self);
00196 }
00197 
00198 
00199 void unity_scope_proxy_set_global_results_model (UnityScopeProxy* self, DeeSerializableModel* value) {
00200        g_return_if_fail (self != NULL);
00201        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_global_results_model (self, value);
00202 }
00203 
00204 
00205 DeeSerializableModel* unity_scope_proxy_get_filters_model (UnityScopeProxy* self) {
00206        g_return_val_if_fail (self != NULL, NULL);
00207        return UNITY_SCOPE_PROXY_GET_INTERFACE (self)->get_filters_model (self);
00208 }
00209 
00210 
00211 void unity_scope_proxy_set_filters_model (UnityScopeProxy* self, DeeSerializableModel* value) {
00212        g_return_if_fail (self != NULL);
00213        UNITY_SCOPE_PROXY_GET_INTERFACE (self)->set_filters_model (self, value);
00214 }
00215 
00216 
00217 static void unity_scope_proxy_base_init (UnityScopeProxyIface * iface) {
00218        static gboolean initialized = FALSE;
00219        if (!initialized) {
00220               initialized = TRUE;
00221               g_object_interface_install_property (iface, g_param_spec_object ("sources", "sources", "sources", UNITY_TYPE_OPTIONS_FILTER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00222               g_object_interface_install_property (iface, g_param_spec_boolean ("search-in-global", "search-in-global", "search-in-global", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00223               g_object_interface_install_property (iface, g_param_spec_enum ("view-type", "view-type", "view-type", UNITY_PROTOCOL_TYPE_VIEW_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00224               g_object_interface_install_property (iface, g_param_spec_object ("results-model", "results-model", "results-model", dee_serializable_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00225               g_object_interface_install_property (iface, g_param_spec_object ("global-results-model", "global-results-model", "global-results-model", dee_serializable_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00226               g_object_interface_install_property (iface, g_param_spec_object ("filters-model", "filters-model", "filters-model", dee_serializable_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
00227        }
00228 }
00229 
00230 
00231 GType unity_scope_proxy_get_type (void) {
00232        static volatile gsize unity_scope_proxy_type_id__volatile = 0;
00233        if (g_once_init_enter (&unity_scope_proxy_type_id__volatile)) {
00234               static const GTypeInfo g_define_type_info = { sizeof (UnityScopeProxyIface), (GBaseInitFunc) unity_scope_proxy_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
00235               GType unity_scope_proxy_type_id;
00236               unity_scope_proxy_type_id = g_type_register_static (G_TYPE_INTERFACE, "UnityScopeProxy", &g_define_type_info, 0);
00237               g_type_interface_add_prerequisite (unity_scope_proxy_type_id, G_TYPE_OBJECT);
00238               g_once_init_leave (&unity_scope_proxy_type_id__volatile, unity_scope_proxy_type_id);
00239        }
00240        return unity_scope_proxy_type_id__volatile;
00241 }
00242 
00243 
00244