Classes | Defines | Functions | Variables
htmltitle.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <curl/curl.h>
#include <libxml/HTMLparser.h>
Include dependency graph for htmltitle.cpp:

Go to the source code of this file.

Classes

struct  Context

Defines

#define COMPARE(a, b)   (!strcasecmp((a), (b)))

Functions

static void cdata (void *voidContext, const xmlChar *chars, int length)
static void Characters (void *voidContext, const xmlChar *chars, int length)
static void EndElement (void *voidContext, const xmlChar *name)
static void handleCharacters (Context *context, const xmlChar *chars, int length)
static bool init (CURL *&conn, char *url)
int main (int argc, char *argv[])
static void parseHtml (const std::string &html, std::string &title)
static void StartElement (void *voidContext, const xmlChar *name, const xmlChar **attributes)
static int writer (char *data, size_t size, size_t nmemb, std::string *writerData)

Variables

static std::string buffer
static char errorBuffer [CURL_ERROR_SIZE]
static htmlSAXHandler saxHandler

Define Documentation

#define COMPARE (   a,
 
)    (!strcasecmp((a), (b)))

Definition at line 47 of file htmltitle.cpp.


Function Documentation

static void cdata ( void *  voidContext,
const xmlChar *  chars,
int  length 
) [static]

Definition at line 203 of file htmltitle.cpp.

static void Characters ( void *  voidContext,
const xmlChar *  chars,
int  length 
) [static]

Definition at line 190 of file htmltitle.cpp.

static void EndElement ( void *  voidContext,
const xmlChar *  name 
) [static]

Definition at line 165 of file htmltitle.cpp.

static void handleCharacters ( Context context,
const xmlChar *  chars,
int  length 
) [static]

Definition at line 178 of file htmltitle.cpp.

static bool init ( CURL *&  conn,
char *  url 
) [static]

Definition at line 87 of file htmltitle.cpp.

int main ( int  argc,
char *  argv[] 
)

Definition at line 268 of file htmltitle.cpp.

static void parseHtml ( const std::string &  html,
std::string &  title 
) [static]

Definition at line 251 of file htmltitle.cpp.

static void StartElement ( void *  voidContext,
const xmlChar *  name,
const xmlChar **  attributes 
) [static]

Definition at line 147 of file htmltitle.cpp.

static int writer ( char *  data,
size_t  size,
size_t  nmemb,
std::string *  writerData 
) [static]

Definition at line 72 of file htmltitle.cpp.


Variable Documentation

std::string buffer [static]

Definition at line 66 of file htmltitle.cpp.

char errorBuffer[CURL_ERROR_SIZE] [static]

Definition at line 65 of file htmltitle.cpp.

htmlSAXHandler saxHandler [static]
Initial value:
{
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  StartElement,
  EndElement,
  NULL,
  Characters,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  cdata,
  NULL
}

Definition at line 216 of file htmltitle.cpp.



rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:08