summaryrefslogtreecommitdiff
path: root/scraper/thetvdbscraper/tvdbactor.h
blob: ed7719973021e460bb1dee00bea895c19f003c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __TVSCRAPER_TVDBACTORS_H
#define __TVSCRAPER_TVDBACTORS_H

#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include "tvdbmirrors.h"

using namespace std; 

// --- cTVDBActor -------------------------------------------------------------
class cTVDBActor {
public:
    cTVDBActor(void) {
        thumbUrl = "";
        name = "";
        role = "";
        id = 0;
        sortOrder = 0;
        thumbUrlWidth = 300;
        thumbUrlHeight = 450;
    };
    string thumbUrl;
    int thumbUrlWidth;
    int thumbUrlHeight;
    string name;
    string role;
    int id;
    int sortOrder;
    void Dump() {
        cout << "Actor name: " << name << ", ID: " << id << endl;
        cout << "Actor role: " << role << endl;
        cout << "Actor thumb: " << thumbUrl << endl;
        cout << "Actor SortOrder: " << sortOrder << endl;
    }
};

// --- cTVDBActors --------------------------------------------------------

class cTVDBActors {
private:
    cTVDBMirrors *mirrors;
    string language;
    cTVDBActor *ReadEntry(xmlDoc *doc, xmlNode *node);
public:
    cTVDBActors(string language, cTVDBMirrors *mirrors);
    virtual ~cTVDBActors(void);
    void ParseXML(string xml, vector<cTVDBActor*> *actors);
};

#endif //__TVSCRAPER_TVDBACTORS_H