#include "repository.h"
#include "stringbuffer.h"
#include <stdio.h>
#include <string.h>
#include <libxml/encoding.h>
Go to the source code of this file.
Defines | |
#define | DEFAULT_ENCODING "ISO-8859-1" |
Functions | |
void | jasperserver_print_resource_descriptor (jasperserver_resource_descriptor_t *rd, int depth) |
void | jasperserver_print_resource_property (jasperserver_resource_property_t *rp, int depth) |
void | jasperserver_print_parameter (jasperserver_parameter_t *rp, int depth) |
void | jasperserver_list_free (jasperserver_list_t *list, void(*freeFunc)(void *)) |
This is a quick way to free an entire list of elements. | |
jasperserver_request_t * | jasperserver_request_new () |
Instance a new request. | |
void | jasperserver_request_free (jasperserver_request_t *request) |
Free a request. | |
jasperserver_argument_t * | jasperserver_argument_new () |
Instance a new argument. | |
void | jasperserver_argument_free (void *argument_ptr) |
Free an argument. | |
jasperserver_resource_descriptor_t * | jasperserver_resource_descriptor_new () |
Instance a new resource_descriptor. | |
void | jasperserver_resource_descriptor_free (void *res_ptr) |
Free a resource_descriptor. | |
jasperserver_resource_property_t * | jasperserver_resource_property_new () |
Instance a new resource_property. | |
void | jasperserver_resource_property_free (void *resp_ptr) |
Free a resource_property. | |
jasperserver_parameter_t * | jasperserver_parameter_new () |
Instance a new parameter. | |
void | jasperserver_parameter_free (void *resp_ptr) |
Free a parameter. | |
jasperserver_operation_result_t * | jasperserver_operation_result_new () |
Instance a new operation_result. | |
void | jasperserver_operation_result_free (void *op_ptr) |
Free a operation_result. | |
jasperserver_server_t * | jasperserver_server_new () |
Instance a new server. | |
void | jasperserver_server_free (void *op_ptr) |
void | jasperserver_list_append (jasperserver_list_t **list, jasperserver_list_t *node) |
Append node at the end of the list pointed by list. | |
jasperserver_resource_property_t * | jasperserver_get_property (jasperserver_resource_descriptor_t *resource, char *propName) |
Get a property with name 'propName' from the resource 'resource' This funciont looks inside the resource descriptor passed as first parameter for a parameter called 'propName'. | |
jasperserver_string_t * | jasperserver_get_property_value (jasperserver_resource_descriptor_t *resource, char *propName) |
Get the value of a property with name 'propName' from the resource 'resource' This funciont looks inside the resource descriptor passed as first parameter for a parameter called 'propName' and if found, return the property value. |
#define DEFAULT_ENCODING "ISO-8859-1" |
Definition at line 22 of file repository.c.
void jasperserver_argument_free | ( | void * | argument | ) |
Free an argument.
Free the memory allocated using jasperserver_argument_new.
argument | The argument to free (jasperserver_argument_t * assumed) |
Definition at line 118 of file repository.c.
jasperserver_argument_t* jasperserver_argument_new | ( | ) |
Instance a new argument.
This function initializes the argument.
It is responsability of the user free the memory allocated by this function using jasperserver_argument_free()
Definition at line 97 of file repository.c.
jasperserver_resource_property_t* jasperserver_get_property | ( | jasperserver_resource_descriptor_t * | resource, | |
char * | propName | |||
) |
Get a property with name 'propName' from the resource 'resource' This funciont looks inside the resource descriptor passed as first parameter for a parameter called 'propName'.
inputcontrol | The resource in which look for the property | |
propName | The name of the property to look for |
Definition at line 434 of file repository.c.
jasperserver_string_t* jasperserver_get_property_value | ( | jasperserver_resource_descriptor_t * | resource, | |
char * | propName | |||
) |
Get the value of a property with name 'propName' from the resource 'resource' This funciont looks inside the resource descriptor passed as first parameter for a parameter called 'propName' and if found, return the property value.
resource | The resource in which look for the property | |
propName | The name of the property to look for |
Definition at line 449 of file repository.c.
void jasperserver_list_append | ( | jasperserver_list_t ** | list, | |
jasperserver_list_t * | node | |||
) |
Append node at the end of the list pointed by list.
jasperserver_list_append takes the pointer to a pointer of the first element of a list. If traverse the list up to the end, and add the new node updating the field 'next' of the previous node.
list | It is a pointer to a pointer of a list | |
node | the element to append |
Definition at line 361 of file repository.c.
void jasperserver_list_free | ( | jasperserver_list_t * | list, | |
void(*)(void *) | freeFunc | |||
) |
This is a quick way to free an entire list of elements.
jasperserver_list_free takes a pointer to list and call itself on list->next. Each node is freed using the function passed. Example:
jasperserver_list_free( (jasperserver_list_t *)request->arguments, jasperserver_argument_free);
list | It is a pointer to a list | |
freeFunc | the address of the function to use to free each node |
Definition at line 39 of file repository.c.
void jasperserver_operation_result_free | ( | void * | op_ptr | ) |
Free a operation_result.
Free the memory allocated using jasperserver_operation_result_new.
This method frees recursively all the elements of the operation_result and relative lists.
operation_result | The operation_result to free (jasperserver_operation_result_t* assumed) |
Definition at line 291 of file repository.c.
jasperserver_operation_result_t* jasperserver_operation_result_new | ( | ) |
Instance a new operation_result.
This function initializes the operation_result.
It is responsability of the user free the memory allocated by this function using jasperserver_operation_result_free()
Definition at line 271 of file repository.c.
void jasperserver_parameter_free | ( | void * | parameter | ) |
Free a parameter.
Free the memory allocated using jasperserver_parameter_new.
This method frees recursively all the elements of the parameter and relative lists.
parameter | The parameter to free (jasperserver_parameter_t* assumed) |
Definition at line 264 of file repository.c.
jasperserver_parameter_t* jasperserver_parameter_new | ( | ) |
Instance a new parameter.
This function initializes the parameter.
It is responsability of the user free the memory allocated by this function using jasperserver_parameter_free()
Definition at line 257 of file repository.c.
void jasperserver_print_parameter | ( | jasperserver_parameter_t * | rp, | |
int | depth | |||
) |
Definition at line 424 of file repository.c.
void jasperserver_print_resource_descriptor | ( | jasperserver_resource_descriptor_t * | rd, | |
int | depth | |||
) |
Definition at line 381 of file repository.c.
void jasperserver_print_resource_property | ( | jasperserver_resource_property_t * | rp, | |
int | depth | |||
) |
Definition at line 409 of file repository.c.
void jasperserver_request_free | ( | jasperserver_request_t * | request | ) |
Free a request.
Free the memory allocated using jasperserver_request_new.
This method frees recursively all the elements of the request and relative lists.
request | The request to free |
Definition at line 70 of file repository.c.
jasperserver_request_t* jasperserver_request_new | ( | ) |
Instance a new request.
This function initializes the request. The resource field is set to NULL, the operation is set to OPERATION_LIST, locale is set to "en" and arguments to NULL.
It is responsability of the user free the memory allocated by this function using jasperserver_request_free()
Definition at line 49 of file repository.c.
void jasperserver_resource_descriptor_free | ( | void * | resource_descriptor | ) |
Free a resource_descriptor.
Free the memory allocated using jasperserver_resource_descriptor_new.
This method frees recursively all the elements of the resource_descriptor and relative lists.
resource_descriptor | The resource_descriptor to free (jasperserver_resource_descriptor_t * assumed) |
Definition at line 173 of file repository.c.
jasperserver_resource_descriptor_t* jasperserver_resource_descriptor_new | ( | ) |
Instance a new resource_descriptor.
This function initializes the resource_descriptor.
It is responsability of the user free the memory allocated by this function using jasperserver_resource_descriptor_free()
Definition at line 137 of file repository.c.
void jasperserver_resource_property_free | ( | void * | resource_property | ) |
Free a resource_property.
Free the memory allocated using jasperserver_resource_property_new.
This method frees recursively all the elements of the resource_property and relative lists.
resource_property | The resource_property to free (jasperserver_resource_property_t* assumed) |
Definition at line 233 of file repository.c.
jasperserver_resource_property_t* jasperserver_resource_property_new | ( | ) |
Instance a new resource_property.
This function initializes the resource_property.
It is responsability of the user free the memory allocated by this function using jasperserver_resource_property_free()
Definition at line 212 of file repository.c.
void jasperserver_server_free | ( | void * | op_ptr | ) |
Definition at line 337 of file repository.c.
jasperserver_server_t* jasperserver_server_new | ( | ) |
Instance a new server.
This function initializes the server.
It is responsability of the user free the memory allocated by this function using jasperserver_server_free()
Definition at line 316 of file repository.c.