LIBSSDP
 All Classes Files Functions Variables Typedefs Macros
Classes | Typedefs | Functions
ssdp_cache.h File Reference
#include "configuration.h"
#include "ssdp_message.h"
#include "sys/socket.h"
Include dependency graph for ssdp_cache.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ssdp_cache_struct
 

Typedefs

typedef struct ssdp_cache_struct ssdp_cache_s
 

Functions

BOOL add_ssdp_message_to_cache (ssdp_cache_s **ssdp_cache_pointer, ssdp_message_s **ssdp_message_pointer)
 
int flush_ssdp_cache (configuration_s *conf, ssdp_cache_s **ssdp_cache_pointer, const char *url, struct sockaddr_storage *sockaddr_recipient, int port, int timeout)
 

Detailed Description

Header file for ssdp_cache.c.

Definition in file ssdp_cache.h.

Typedef Documentation

The ssdp_message_s cache that acts as a buffer for sending bulks of messages instead of spamming; *ssdp_message should always point to the last ssdp_message in the buffer.

Function Documentation

BOOL add_ssdp_message_to_cache ( ssdp_cache_s **  ssdp_cache_pointer,
ssdp_message_s **  ssdp_message_pointer 
)

Adds a ssdp message to a ssdp messages list. If the list hasn't been initialized then it is initialized first.

Parameters
ssdp_cache_pointerThe address of a pointer to a ssdp cache list.
ssdp_message_pointerThe ssdp message to be appended to the cache list.
Returns
TRUE on success, exits on failure.

Definition at line 290 of file ssdp_cache.c.

int flush_ssdp_cache ( configuration_s conf,
ssdp_cache_s **  ssdp_cache_pointer,
const char *  url,
struct sockaddr_storage *  sockaddr_recipient,
int  port,
int  timeout 
)

Send and free the passed SSDP cache.

Parameters
confThe configuration to use.
ssdp_cache_pointerThe SSDP cache to send and delete (flush).
urlThe URL (without the protocol and IP) to send the data to.
sockaddr_recipientThe socket address to send to.
portThe port to send to.
timeoutThe send-timeout to set.
Returns
TRUE on success, FALSE otherwise.

Definition at line 392 of file ssdp_cache.c.