Classes | Macros | 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
 

Macros

#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
 

Macro Definition Documentation

◆ COMPARE

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

Definition at line 47 of file htmltitle.cpp.

Function Documentation

◆ cdata()

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

Definition at line 190 of file htmltitle.cpp.

◆ Characters()

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

Definition at line 177 of file htmltitle.cpp.

◆ EndElement()

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

Definition at line 152 of file htmltitle.cpp.

◆ handleCharacters()

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

Definition at line 165 of file htmltitle.cpp.

◆ init()

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

Definition at line 87 of file htmltitle.cpp.

◆ main()

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

Definition at line 255 of file htmltitle.cpp.

◆ parseHtml()

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

Definition at line 238 of file htmltitle.cpp.

◆ StartElement()

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

Definition at line 135 of file htmltitle.cpp.

◆ writer()

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

◆ buffer

std::string buffer
static

Definition at line 66 of file htmltitle.cpp.

◆ errorBuffer

char errorBuffer[CURL_ERROR_SIZE]
static

Definition at line 65 of file htmltitle.cpp.

◆ saxHandler

htmlSAXHandler saxHandler
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
}

Definition at line 203 of file htmltitle.cpp.

Characters
static void Characters(void *voidContext, const xmlChar *chars, int length)
Definition: htmltitle.cpp:177
cdata
static void cdata(void *voidContext, const xmlChar *chars, int length)
Definition: htmltitle.cpp:190
StartElement
static void StartElement(void *voidContext, const xmlChar *name, const xmlChar **attributes)
Definition: htmltitle.cpp:135
EndElement
static void EndElement(void *voidContext, const xmlChar *name)
Definition: htmltitle.cpp:152


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sun May 15 2022 02:25:01