skeleton
[data]

Collaboration diagram for skeleton:

Detailed Description

Module for manage EasyDbus skeleton objects.

Skeleton object is used for indicated message object, in particular, EasyDbus_reply_msg, EasyDbus_signal or EasyDbus_method.

Skeleton Meta Information

Contact:
Daniele Rondina aka Ge@@ru <geaaru@gmail.com>
Status:
EasyDbus Core Library
License:
GPL
Contributor(s):


Functions

int easydbus_add_array_param_to_skeleton (enum event_type type, void *skeleton, struct EasyDbus_container *container)
 Add array struct to skeleton object.
int easydbus_add_boolean_param_to_skeleton (enum event_type type, void *skeleton, unsigned char boolean)
 Add boolean element to skeleton object.
int easydbus_add_byte_param_to_skeleton (enum event_type type, void *skeleton, char byte)
 Add byte element to skeleton object.
int easydbus_add_double_param_to_skeleton (enum event_type type, void *skeleton, double d)
 Add double element to skeleton object.
int easydbus_add_i16_param_to_skeleton (enum event_type type, void *skeleton, short i)
 Add int16 element to skeleton object.
int easydbus_add_i32_param_to_skeleton (enum event_type type, void *skeleton, int i)
 Add int32 element to skeleton object.
int easydbus_add_i64_param_to_skeleton (enum event_type type, void *skeleton, long long i)
 Add int64 to skeleton object.
int easydbus_add_obj_path_param_to_skeleton (enum event_type type, void *skeleton, char *string)
 Add object path string to skeleton object.
int easydbus_add_signature_param_to_skeleton (enum event_type type, void *skeleton, char *signature)
 Add signature element to skeleton.
int easydbus_add_string_param_to_skeleton (enum event_type type, void *skeleton, char *string)
 Add string element to skeleton object.
int easydbus_add_struct_param_to_skeleton (enum event_type type, void *skeleton, struct EasyDbus_container *container)
 Add struct container to skeleton object.
int easydbus_add_ui16_param_to_skeleton (enum event_type type, void *skeleton, unsigned short i)
 Add unsigned int16 to skeleton object.
int easydbus_add_ui32_param_to_skeleton (enum event_type type, void *skeleton, unsigned int i)
 Add unsigned int32 to skeleton object.
int easydbus_add_ui64_param_to_skeleton (enum event_type type, void *skeleton, unsigned long long i)
 Add unsigned int64 to skeleton object.
int easydbus_add_variant_param_to_skeleton (enum event_type type, void *skeleton, struct EasyDbus_container *container)
 Add variant container to skeleton object.


Function Documentation

int easydbus_add_array_param_to_skeleton ( enum event_type  type,
void *  skeleton,
struct EasyDbus_container container 
)

Add array struct to skeleton object.

Parameters:
type type of message
skeleton message object pointer
container array container to add.
Returns:
-1 error

0 ok

Definition at line 219 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_ARRAY, EasyDbus_elem::p_container, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data(), and easydbus_struct_build_elem().

00222 {
00223    struct EasyDbus_elem *el = NULL;
00224 
00225    if (!container || !skeleton)
00226       return -1;
00227 
00228    el = easydbus_elem_create (EASYDBUS_ELTYPE_ARRAY);
00229    if (!el)
00230       return -1;
00231 
00232    el->payload.p_container = container;
00233 
00234    easydbus_elem_add_to_skeleton (type, skeleton, el);
00235 
00236    return 0;
00237 }

Here is the call graph for this function:

int easydbus_add_boolean_param_to_skeleton ( enum event_type  type,
void *  skeleton,
unsigned char  boolean 
)

Add boolean element to skeleton object.

Parameters:
type type of message
skeleton message object pointer
boolean boolean to add.
Returns:
-1 error

0 ok

Definition at line 191 of file skeleton.c.

References EasyDbus_elem::boolean, easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_BOOLEAN, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00194 {
00195    struct EasyDbus_elem *el = NULL;
00196 
00197    if (boolean > 1)
00198       return -1;
00199 
00200    el = easydbus_elem_create (EASYDBUS_ELTYPE_BOOLEAN);
00201    if (!el)
00202       return -1;
00203    el->payload.boolean = boolean;
00204 
00205    easydbus_elem_add_to_skeleton (type, skeleton, el);
00206 
00207    return 0;
00208 }

Here is the call graph for this function:

int easydbus_add_byte_param_to_skeleton ( enum event_type  type,
void *  skeleton,
char  byte 
)

Add byte element to skeleton object.

Parameters:
type type of message
skeleton message object pointer
byte byte to add.
Returns:
-1 error

0 ok

Definition at line 167 of file skeleton.c.

References EasyDbus_elem::byte, easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_BYTE, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00169 {
00170    struct EasyDbus_elem *el = NULL;
00171 
00172    el = easydbus_elem_create (EASYDBUS_ELTYPE_BYTE);
00173    if (!el)
00174       return -1;
00175    el->payload.byte = byte;
00176 
00177    easydbus_elem_add_to_skeleton (type, skeleton, el);
00178 
00179    return 0;
00180 }

Here is the call graph for this function:

int easydbus_add_double_param_to_skeleton ( enum event_type  type,
void *  skeleton,
double  d 
)

Add double element to skeleton object.

Parameters:
type type of message
skeleton message object pointer
d double to add.
Returns:
-1 error

0 ok

Definition at line 387 of file skeleton.c.

References EasyDbus_elem::Double, easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_DOUBLE, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00390 {
00391    struct EasyDbus_elem *el = NULL;
00392 
00393    el = easydbus_elem_create (EASYDBUS_ELTYPE_DOUBLE);
00394    if (!el)
00395       return -1;
00396    el->payload.Double = d;
00397 
00398    easydbus_elem_add_to_skeleton (type, skeleton, el);
00399 
00400    return 0;
00401 }

Here is the call graph for this function:

int easydbus_add_i16_param_to_skeleton ( enum event_type  type,
void *  skeleton,
short  i 
)

Add int16 element to skeleton object.

Parameters:
type type of message
skeleton message object pointer
i int16 to add.
Returns:
-1 error

0 ok

Definition at line 143 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_INT16, EasyDbus_elem::i16, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00145 {
00146    struct EasyDbus_elem *el = NULL;
00147 
00148    el = easydbus_elem_create (EASYDBUS_ELTYPE_INT16);
00149    if (!el)
00150       return -1;
00151    el->payload.i16 = i;
00152 
00153    easydbus_elem_add_to_skeleton (type, skeleton, el);
00154 
00155    return 0;
00156 }

Here is the call graph for this function:

int easydbus_add_i32_param_to_skeleton ( enum event_type  type,
void *  skeleton,
int  i 
)

Add int32 element to skeleton object.

Parameters:
type type of message
skeleton message object pointer
i int32 value to add.
Returns:
-1 error

0 ok

Definition at line 412 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_INT32, EasyDbus_elem::i32, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00414 {
00415    struct EasyDbus_elem *el = NULL;
00416 
00417    if (!skeleton)
00418       return -1;
00419 
00420    el = easydbus_elem_create (EASYDBUS_ELTYPE_INT32);
00421    if (!el)
00422       return -1;
00423    el->payload.i32 = i;
00424 
00425    easydbus_elem_add_to_skeleton (type, skeleton, el);
00426 
00427    return 0;
00428 }

Here is the call graph for this function:

int easydbus_add_i64_param_to_skeleton ( enum event_type  type,
void *  skeleton,
long long  i 
)

Add int64 to skeleton object.

Parameters:
type type of message
skeleton message object pointer
i int64 value to add.
Returns:
-1 error

0 ok

Definition at line 464 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_INT64, EasyDbus_elem::i64, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00467 {
00468    struct EasyDbus_elem *el = NULL;
00469 
00470    el = easydbus_elem_create (EASYDBUS_ELTYPE_INT64);
00471    if (!el)
00472       return -1;
00473    el->payload.i64 = i;
00474 
00475    easydbus_elem_add_to_skeleton (type, skeleton, el);
00476 
00477    return 0;
00478 }

Here is the call graph for this function:

int easydbus_add_obj_path_param_to_skeleton ( enum event_type  type,
void *  skeleton,
char *  string 
)

Add object path string to skeleton object.

Parameters:
type type of message
skeleton message object pointer
string object path string to add.
Returns:
-1 error

0 ok

Definition at line 286 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), easydbus_elem_free(), EASYDBUS_ELTYPE_OBJECT_PATH, EASYDBUS_MEMCOPY, EasyDbus_elem::payload, and EasyDbus_elem::string.

Referenced by easydbus_build_skeleton_data().

00289 {
00290    struct EasyDbus_elem *el = NULL;
00291    int string_length = 0;
00292 
00293    if (!string || !skeleton)
00294       return -1;
00295 
00296    el = easydbus_elem_create (EASYDBUS_ELTYPE_OBJECT_PATH);
00297    if (!el)
00298       return -1;
00299 
00300    string_length = strlen (string) + 1;
00301    el->payload.string = (char *) malloc (string_length);
00302 
00303    if (!el->payload.string) {
00304       easydbus_elem_free (el);
00305       return -1;
00306    }
00307 
00308    EASYDBUS_MEMCOPY (el->payload.string, string, string_length);
00309 
00310    easydbus_elem_add_to_skeleton (type, skeleton, el);
00311 
00312    return 0;
00313 }

Here is the call graph for this function:

int easydbus_add_signature_param_to_skeleton ( enum event_type  type,
void *  skeleton,
char *  signature 
)

Add signature element to skeleton.

Parameters:
type type of message
skeleton message object pointer
signature signature string to add.
Returns:
-1 error

0 ok

Definition at line 324 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), easydbus_elem_free(), EASYDBUS_ELTYPE_SIGNATURE, EASYDBUS_MEMCOPY, EasyDbus_elem::payload, and EasyDbus_elem::string.

Referenced by easydbus_build_skeleton_data().

00327 {
00328    struct EasyDbus_elem *el = NULL;
00329    int string_length = 0;
00330 
00331    if (!signature || !skeleton)
00332       return -1;
00333 
00334    el = easydbus_elem_create (EASYDBUS_ELTYPE_SIGNATURE);
00335    if (!el)
00336       return -1;
00337 
00338    string_length = strlen (signature) + 1;
00339    el->payload.string = (char *) malloc (string_length);
00340 
00341    if (!el->payload.string) {
00342       easydbus_elem_free (el);
00343       return -1;
00344    }
00345 
00346    EASYDBUS_MEMCOPY (el->payload.string, signature, string_length);
00347 
00348    easydbus_elem_add_to_skeleton (type, skeleton, el);
00349 
00350    return 0;
00351 }

Here is the call graph for this function:

int easydbus_add_string_param_to_skeleton ( enum event_type  type,
void *  skeleton,
char *  string 
)

Add string element to skeleton object.

Parameters:
type type of message
skeleton message object pointer
string string to add.
Returns:
-1 error

0 ok

Definition at line 248 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), easydbus_elem_free(), EASYDBUS_ELTYPE_STRING, EASYDBUS_MEMCOPY, EasyDbus_elem::payload, and EasyDbus_elem::string.

Referenced by easydbus_build_skeleton_data(), easydbus_introspect_filter_func(), and easydbus_reply_build_error().

00251 {
00252    struct EasyDbus_elem *el = NULL;
00253    int string_length = 0;
00254 
00255    if (!string || !skeleton)
00256       return -1;
00257 
00258    el = easydbus_elem_create (EASYDBUS_ELTYPE_STRING);
00259    if (!el)
00260       return -1;
00261 
00262    string_length = strlen (string) + 1;
00263    el->payload.string = (char *) malloc (string_length);
00264 
00265    if (!el->payload.string) {
00266       easydbus_elem_free (el);
00267       return -1;
00268    }
00269 
00270    EASYDBUS_MEMCOPY (el->payload.string, string, string_length);
00271 
00272    easydbus_elem_add_to_skeleton (type, skeleton, el);
00273 
00274    return 0;
00275 }

Here is the call graph for this function:

int easydbus_add_struct_param_to_skeleton ( enum event_type  type,
void *  skeleton,
struct EasyDbus_container container 
)

Add struct container to skeleton object.

Parameters:
type type of message
skeleton message object pointer
container struct container to add.
Returns:
-1 error

0 ok

Definition at line 87 of file skeleton.c.

References EasyDbus_container::container_type, easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_STRUCT, EasyDbus_elem::p_container, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00090 {
00091    struct EasyDbus_elem *el = NULL;
00092 
00093    if (container == NULL ||
00094        skeleton == NULL ||
00095        container->container_type != EASYDBUS_ELTYPE_STRUCT)
00096       return -1;
00097 
00098    el = easydbus_elem_create (EASYDBUS_ELTYPE_STRUCT);
00099    if (!el)
00100       return -1;
00101    el->payload.p_container = container;
00102 
00103    easydbus_elem_add_to_skeleton (type, skeleton, el);
00104 
00105    return 0;
00106 }

Here is the call graph for this function:

int easydbus_add_ui16_param_to_skeleton ( enum event_type  type,
void *  skeleton,
unsigned short  i 
)

Add unsigned int16 to skeleton object.

Parameters:
type type of message
skeleton message object pointer
i unsigned int16 to add.
Returns:
-1 error

0 ok

Definition at line 117 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_UINT16, EasyDbus_elem::payload, and EasyDbus_elem::ui16.

Referenced by easydbus_build_skeleton_data().

00120 {
00121    struct EasyDbus_elem *el = NULL;
00122 
00123    el = easydbus_elem_create (EASYDBUS_ELTYPE_UINT16);
00124    if (!el)
00125       return -1;
00126    el->payload.ui16 = i;
00127 
00128    easydbus_elem_add_to_skeleton (type, skeleton, el);
00129 
00130    return 0;
00131 }

Here is the call graph for this function:

int easydbus_add_ui32_param_to_skeleton ( enum event_type  type,
void *  skeleton,
unsigned int  i 
)

Add unsigned int32 to skeleton object.

Parameters:
type type of message
skeleton message object pointer
i unsigned int32 value to add.
Returns:
-1 error

0 ok

Definition at line 362 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_UINT32, EasyDbus_elem::payload, and EasyDbus_elem::ui32.

Referenced by easydbus_build_skeleton_data().

00365 {
00366    struct EasyDbus_elem *el = NULL;
00367 
00368    el = easydbus_elem_create (EASYDBUS_ELTYPE_UINT32);
00369    if (!el)
00370       return -1;
00371    el->payload.ui32 = i;
00372 
00373    easydbus_elem_add_to_skeleton (type, skeleton, el);
00374 
00375    return 0;
00376 }

Here is the call graph for this function:

int easydbus_add_ui64_param_to_skeleton ( enum event_type  type,
void *  skeleton,
unsigned long long  i 
)

Add unsigned int64 to skeleton object.

Parameters:
type type of message
skeleton message object pointer
i unsigned int64 value to add.
Returns:
-1 error

0 ok

Definition at line 439 of file skeleton.c.

References easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_UINT64, EasyDbus_elem::payload, and EasyDbus_elem::ui64.

Referenced by easydbus_build_skeleton_data().

00442 {
00443    struct EasyDbus_elem *el = NULL;
00444 
00445    el = easydbus_elem_create (EASYDBUS_ELTYPE_UINT64);
00446    if (!el)
00447       return -1;
00448    el->payload.ui64 = i;
00449 
00450    easydbus_elem_add_to_skeleton (type, skeleton, el);
00451 
00452    return 0;
00453 }

Here is the call graph for this function:

int easydbus_add_variant_param_to_skeleton ( enum event_type  type,
void *  skeleton,
struct EasyDbus_container container 
)

Add variant container to skeleton object.

Parameters:
type type of message
skeleton message object pointer
container variant container to add.
Returns:
-1 error

0 ok

Definition at line 57 of file skeleton.c.

References EasyDbus_container::container_type, easydbus_elem_add_to_skeleton(), easydbus_elem_create(), EASYDBUS_ELTYPE_VARIANT, EasyDbus_elem::p_container, and EasyDbus_elem::payload.

Referenced by easydbus_build_skeleton_data().

00060 {
00061    struct EasyDbus_elem *el = NULL;
00062 
00063    if (!container || !skeleton ||
00064        container->container_type != EASYDBUS_ELTYPE_VARIANT)
00065       return -1;
00066 
00067    el = easydbus_elem_create (EASYDBUS_ELTYPE_VARIANT);
00068    if (!el)
00069       return -1;
00070    el->payload.p_container = container;
00071 
00072    easydbus_elem_add_to_skeleton (type, skeleton, el);
00073 
00074    return 0;
00075 
00076 }

Here is the call graph for this function:


Generated on Thu Apr 10 10:01:20 2008 for EasyDbus-0.2 by  doxygen 1.5.4