![]() |
Signature stack it is used for manage build of signature used on creation of introspect message and for manage empty array.
Data Structures | |
struct | easydbus_signature_elem_stack |
Struct used on easydbus_add_signature_to_empty_container function to manage marshalled data. FIFO (first-in first-out) algorithm used. More... | |
struct easydbus_signature_elem_stack * | easydbus_add_elem_to_stack (enum el_type el, struct easydbus_signature_elem_stack *stack) |
Add element on signature stack. | |
void | easydbus_free_elem_from_stack (struct easydbus_signature_elem_stack *el) |
Free signature element. | |
void | easydbus_free_elem_from_stack_list (struct easydbus_signature_elem_stack *list) |
Free signature stack list. | |
Enumerations | |
enum | signature_flags { EASYDBUS_SIGNATURE_NORMAL = 0, EASYDBUS_SIGNATURE_VARIANT = 1 } |
signature flags Used internally for manage signature creation More... |
enum signature_flags |
signature flags Used internally for manage signature creation
For internal use only.
EASYDBUS_SIGNATURE_NORMAL | normal signature |
EASYDBUS_SIGNATURE_VARIANT | signature for variant elements |
Definition at line 327 of file easydbus-core.h.
00327 { 00329 EASYDBUS_SIGNATURE_NORMAL = 0, 00331 EASYDBUS_SIGNATURE_VARIANT = 1 00332 };
struct easydbus_signature_elem_stack* easydbus_add_elem_to_stack | ( | enum el_type | el, | |
struct easydbus_signature_elem_stack * | stack | |||
) | [read] |
Add element on signature stack.
For internal use only.
el | element type to insert. | |
stack | signature stack where insert element type. |
pointer to list with new elem;
Definition at line 899 of file array_internal.c.
References easydbus_signature_elem_stack::next, easydbus_signature_elem_stack::prev, and easydbus_signature_elem_stack::type.
Referenced by easydbus_add_info_field_on_register_method(), easydbus_add_info_field_on_register_signal(), and easydbus_container_add_signature_to_empty_container().
00902 { 00903 struct easydbus_signature_elem_stack *new_el = NULL; 00904 struct easydbus_signature_elem_stack *tmp_el = NULL; 00905 00906 new_el = (struct easydbus_signature_elem_stack *) 00907 malloc (sizeof (struct easydbus_signature_elem_stack)); 00908 00909 if (!new_el) 00910 return NULL; 00911 00912 memset (new_el, 0, sizeof (struct easydbus_signature_elem_stack)); 00913 new_el->next = new_el->prev = NULL; 00914 new_el->type = el; 00915 00916 if (!stack) 00917 return new_el; 00918 00919 tmp_el = stack; 00920 while (tmp_el->next) 00921 tmp_el = tmp_el->next; 00922 00923 tmp_el->next = new_el; 00924 new_el->prev = tmp_el; 00925 return stack; 00926 }
void easydbus_free_elem_from_stack | ( | struct easydbus_signature_elem_stack * | el | ) |
Free signature element.
For internal use only.
el | signature stack element to free. |
Definition at line 934 of file array_internal.c.
References easydbus_signature_elem_stack::next, and easydbus_signature_elem_stack::prev.
Referenced by easydbus_container_add_signature_to_empty_container(), easydbus_create_arg_signature(), easydbus_free_elem_from_stack_list(), and easydbus_manage_list_signature().
00935 { 00936 if (!el) 00937 return; 00938 00939 if (el->next) 00940 el->next->prev = el->prev; 00941 if (el->prev) 00942 el->prev->next = el->next; 00943 free (el); 00944 }
void easydbus_free_elem_from_stack_list | ( | struct easydbus_signature_elem_stack * | list | ) | [inline] |
Free signature stack list.
For internal use only.
list | signature stack list to free. |
Definition at line 952 of file array_internal.c.
References easydbus_free_elem_from_stack(), and easydbus_signature_elem_stack::next.
Referenced by easydbus_add_info_field_on_register_method(), and easydbus_add_info_field_on_register_signal().
00953 { 00954 struct easydbus_signature_elem_stack *tmp_elem = NULL; 00955 00956 while (list) { 00957 tmp_elem = list; 00958 list = list->next; 00959 easydbus_free_elem_from_stack (tmp_elem); 00960 } 00961 }