easydbus-object.h

Go to the documentation of this file.
00001 /*
00002  EasyDbus: DBUS Binding Library.
00003  Copyright (C) 2007  Daniele Rondina aka ge@@ru, geaaru@gmail.com 
00004 
00005  This program is free software; you can redistribute it and/or
00006  modify it under the terms of the GNU General Public License
00007  as published by the Free Software Foundation; either version 2
00008  of the License, or (at your option) any later version.
00009 
00010  This program is distributed in the hope that it will be useful,
00011  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  GNU General Public License for more details.
00014 
00015  You should have received a copy of the GNU General Public License
00016  along with this program; if not, write to the Free Software
00017  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 
00019   Filename:  easydbus-object.h
00020  
00021   Description:  
00022  
00023   Version:  0.1
00024   Created:  06/12/07 22:25:57 CEST
00025   Revision:  none
00026  
00027   Author:   Daniele Rondina aka Ge@@ru (geaaru@gmail.com) 
00028   License:  GPL 2.0
00029 */
00030 
00031 #ifndef   EASYDBUS_OBJECT_H
00032 #define   EASYDBUS_OBJECT_H
00033 
00034 #   ifdef __cplusplus
00035 extern "C" {
00036 #   endif
00037 
00038 /* use opache structs */
00039 typedef struct easydbus_introspect_arg_info 
00040   easydbus_introspect_arg_info;
00041 typedef struct EasyDbus_obj_method EasyDbus_obj_method;
00042 typedef struct EasyDbus_ext_signal EasyDbus_ext_signal;
00043 typedef struct EasyDbus_obj_interface EasyDbus_obj_interface;
00044 typedef struct EasyDbus_obj_signal EasyDbus_obj_signal;
00045 typedef struct EasyDbus_object EasyDbus_object;
00046 
00047 typedef enum easydbus_ret_values
00048    (*easydbus_obj_method_callback_f) (EasyDbus_method *);
00049    
00050 typedef enum easydbus_ret_values 
00051    (*easydbus_ext_signal_callback_f) (EasyDbus_conn *,
00052                                       EasyDbus_signal *);
00053 
00054 
00055 // Create interface skeleton struct 
00056 EasyDbus_obj_interface *
00057 easydbus_obj_interface_create_skeleton (char *);
00058 
00059 // Add signal to interface skeleton struct
00060 int 
00061 easydbus_obj_interface_add_signal (EasyDbus_obj_interface *,
00062                                    EasyDbus_obj_signal *);
00063 
00064 // Add method to interface skeleton struct
00065 int 
00066 easydbus_obj_interface_add_method (EasyDbus_obj_interface *,
00067                                    EasyDbus_obj_method *);
00068 
00069 EasyDbus_obj_method *
00070 easydbus_obj_interface_get_method (const char *, const char *,
00071                                    const EasyDbus_obj_interface *);
00072 
00073 // Free interface skeleton struct
00074 void 
00075 easydbus_obj_interface_free_skeleton (EasyDbus_obj_interface *);
00076 
00077 // Create object skeleton struct 
00078 EasyDbus_object *
00079 easydbus_object_create_skeleton (char *, void *);
00080 
00081 // Add interface to object skeleton 
00082 int 
00083 easydbus_object_add_interface (EasyDbus_obj_interface *,
00084                                EasyDbus_object *);
00085 
00086 // Register object
00087 int 
00088 easydbus_object_register (EasyDbus_conn *, EasyDbus_object *);
00089 
00090 // Free object skeleton struct
00091 void 
00092 easydbus_object_free_skeleton (EasyDbus_object *);
00093 
00094 // Unregister object
00095 int 
00096 easydbus_object_unregister (EasyDbus_conn *,
00097                             EasyDbus_object *);
00098 
00099 inline const char *
00100 easydbus_object_get_path (EasyDbus_object *);
00101 
00102 inline int 
00103 easydbus_object_get_n_interfaces (EasyDbus_object *);
00104 
00105 EasyDbus_obj_interface *
00106 easydbus_object_get_interface (EasyDbus_object *, 
00107                                unsigned int);
00108 
00109 inline void
00110 easydbus_object_set_closure (EasyDbus_object *,
00111                              void *);
00112 
00113 inline void *
00114 easydbus_object_get_closure (EasyDbus_object *);
00115 
00116 /* register method functions */
00117 EasyDbus_obj_method *
00118 easydbus_obj_method_create (char *);
00119 
00120 void 
00121 easydbus_obj_method_free (EasyDbus_obj_method *);
00122 
00123 /* Set callback function pointer to method_core skeleton 
00124    passed in input */
00125 int 
00126 easydbus_obj_method_set_callback (EasyDbus_obj_method *, 
00127                                   easydbus_obj_method_callback_f);
00128 
00129 /* register signal functions */
00130 EasyDbus_obj_signal *
00131 easydbus_obj_signal_create (char *);
00132 
00133 void 
00134 easydbus_obj_signal_free (EasyDbus_obj_signal *);
00135 
00136 /* Easydbus_ext_signal functions */
00137 EasyDbus_ext_signal *
00138 easydbus_ext_signal_create (char *, char *,
00139                             char *, char *, char *,
00140                             easydbus_ext_signal_callback_f);
00141 
00142 void 
00143 easydbus_ext_signal_free_skeleton (EasyDbus_ext_signal *);
00144 
00145 int 
00146 easydbus_ext_signal_add_to_service (EasyDbus_conn *,
00147                                     EasyDbus_ext_signal *);
00148 
00149 inline int
00150 easydbus_conn_get_n_object (EasyDbus_conn *);
00151 
00152 EasyDbus_object *
00153 easydbus_conn_get_object (EasyDbus_conn *,
00154                           unsigned int);
00155 
00156 #   ifdef __cplusplus
00157    extern "C" {
00158 #   endif
00159 
00160 #endif
00161 // vim: ts=3 shiftwidth=3 expandtab

Generated on Thu Apr 10 10:00:18 2008 for EasyDbus-0.2 by  doxygen 1.5.4