libcsem  0.2
csem_url.h File Reference
#include "csem_common.h"

Go to the source code of this file.

Data Structures

struct  CSEM_Url
 URL data model. More...

Defines

#define CSEM_NS_C_BEGIN
#define CSEM_NS_C_END

Typedefs

typedef CSEM_NS_C_BEGIN struct
CSEM_Url 
CSEM_Url
 URL data model.

Functions

CSEM_UrlCSEM_URL_Create ()
 Create url instance.
void CSEM_URL_Dispose (CSEM_Url *url)
 Dispose the url.
CSEM_Error CSEM_URL_Parse (const char *urlstring, CSEM_Url **url)
 Parse a url string.
CSEM_Error CSEM_URL_Serialize (const CSEM_Url *url, char **urlstring)
 Serialize a url as string format.
CSEM_Error CSEM_URL_Merge (const CSEM_Url *base, const CSEM_Url *relative, CSEM_Url **merged)
 Merge a base url and a relative url.
CSEM_Error CSEM_URL_Copy (const CSEM_Url *src, CSEM_Url **dist)
 Copy the specified url.
CSEM_Bool CSEM_URL_Equal (const CSEM_Url *u1, const CSEM_Url *u2)
 Compare the specified URLs.
CSEM_Error CSEM_URL_Hash (const CSEM_Url *url, int *hash)

Define Documentation

#define CSEM_NS_C_BEGIN
#define CSEM_NS_C_END

Typedef Documentation

URL data model.


Function Documentation

CSEM_Error CSEM_URL_Copy ( const CSEM_Url src,
CSEM_Url **  dist 
)

Copy the specified url.

Parameters:
src[in]the source url
dist[out]a newly created url
Returns:
error code

Create url instance.

void CSEM_URL_Dispose ( CSEM_Url url)
CSEM_Bool CSEM_URL_Equal ( const CSEM_Url u1,
const CSEM_Url u2 
)

Compare the specified URLs.

Parameters:
u1[in]url
u2[in]url
Returns:
result
CSEM_Error CSEM_URL_Hash ( const CSEM_Url url,
int *  hash 
)
CSEM_Error CSEM_URL_Merge ( const CSEM_Url base,
const CSEM_Url relative,
CSEM_Url **  merged 
)

Merge a base url and a relative url.

Parameters:
base[in]base url
relative[in]relative url
merged[out]merged url
Returns:
error code
CSEM_Error CSEM_URL_Parse ( const char *  urlstring,
CSEM_Url **  url 
)

Parse a url string.

Parameters:
urlstring[in]url string
url[out]created url instance
Returns:
error code
Examples:
sample_micro_search.c, sample_micro_stream.c, sample_micro_tree.c, sample_rdfa_search.c, sample_rdfa_stream.c, and sample_rdfa_tree.c.
CSEM_Error CSEM_URL_Serialize ( const CSEM_Url url,
char **  urlstring 
)

Serialize a url as string format.

Parameters:
url[in]url
urlstring[out]string representation of the url
Returns:
error code
Examples:
sample_micro_search.c, sample_micro_stream.c, sample_micro_tree.c, sample_rdfa_search.c, sample_rdfa_stream.c, and sample_rdfa_tree.c.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines