blob: 00781a88dba323fea80b27b69193aee860e5aab3 [file] [log] [blame]
/* Utility functions for dealing with URLs */
#ifndef URLLIB_H_
#define URLLIB_H_
#include "dial_data.h"
#include <stddef.h>
* Concatenate a maxim of max_chars characters from src into dest,
* and return a pointer to the last character in dest.
char* smartstrcat(char* dest, char* src, size_t max_chars);
int urldecode(char *dst, const char *src, size_t max_size);
void xmlencode(char *dst, const char *src, size_t max_size);
* Parse the value of the parameter with the given name from a query string.
char *parse_param(char *query_string, char *param_name);
* Parse the application name out of a URI, such as /app/YouTube/dial_data.
* Note: this parser assumes that the dial_data url is of the form
* /apps/<app_name>/dial_data. If your DIAL server uses a different url-path,
* you will need to adapt the method below.
char *parse_app_name(const char *uri);
* Parse a list of DIALData params out of a query string.
DIALData *parse_params(char * query_string);
#endif // URLLIB_H_