#include <stdlib.h>#include <string.h>#include "common_definitions.h"#include "log.h"#include "ssdp_cache_output_format.h"#include "ssdp_message.h"
Go to the source code of this file.
Functions | |
| unsigned int | cache_to_json (ssdp_cache_s *ssdp_cache, char *json_buffer, unsigned int json_buffer_size) |
| unsigned int | cache_to_xml (ssdp_cache_s *ssdp_cache, char *xml_buffer, unsigned int xml_buffer_size) |
| unsigned int | to_json (const ssdp_message_s *ssdp_message, BOOL full_json, char *json_buffer, int json_buffer_size) |
| unsigned int | to_xml (const ssdp_message_s *ssdp_message, BOOL full_xml, char *xml_buffer, int xml_buffer_size) |
| char * | to_oneline (const ssdp_message_s *message, BOOL monochrome) |
Functions for converting the SSDP cache to different output formats.
Definition in file ssdp_cache_output_format.c.
| unsigned int cache_to_json | ( | ssdp_cache_s * | ssdp_cache, |
| char * | json_buffer, | ||
| unsigned int | json_buffer_size | ||
| ) |
Convert a ssdp cache list (multiple ssdp_messages) to a single JSON blob
| ssdp_cache | The SSDP messages to convert |
| json_message | The buffer to write to |
| json_buffer_size | The buffer size |
Definition at line 22 of file ssdp_cache_output_format.c.
| unsigned int cache_to_xml | ( | ssdp_cache_s * | ssdp_cache, |
| char * | xml_buffer, | ||
| unsigned int | xml_buffer_size | ||
| ) |
Convert a ssdp cache list (multiple ssdp_messages) to a single XML blob
| ssdp_cache | The SSDP messages to convert |
| xml_message | The buffer to write to |
| xml_buffer_size | The buffer size |
Definition at line 43 of file ssdp_cache_output_format.c.
| unsigned int to_json | ( | const ssdp_message_s * | , |
| BOOL | full_json, | ||
| char * | json_buffer, | ||
| int | json_buffer_size | ||
| ) |
Converts a UPnP message to a JSON string
| ssdp_message | The message to be converted |
| full_json | Whether to contain the JSON opening hash |
| json_buffer | The JSON buffer to write the JSON document to |
| json_size | The size of the passed buffer (json_buffer) |
Definition at line 74 of file ssdp_cache_output_format.c.
| char* to_oneline | ( | const ssdp_message_s * | message, |
| BOOL | monochrome | ||
| ) |
Return an oneline string with the message ID, IP and (if present) the model.
| message | The ssdp message to convert. |
| monochrome | Use monochrome (no color) when generating onelines. |
Definition at line 251 of file ssdp_cache_output_format.c.
| unsigned int to_xml | ( | const ssdp_message_s * | ssdp_message, |
| BOOL | full_xml, | ||
| char * | xml_buffer, | ||
| int | xml_buffer_size | ||
| ) |
Converts a UPnP message to a XML string
| ssdp_message | The message to be converted |
| full_xml | Whether to contain the XML declaration and the root tag |
| xml_buffer | The XML buffer to write the XML document to |
| xml_buffer_size | The size of the passed buffer (xml_buffer) |
Definition at line 83 of file ssdp_cache_output_format.c.
1.8.8