blob: 7ec94c2fb1f65a63cd05f75a3ae5a715a9a86614 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
/*
* setup.h
*
* Created on: 21.09.2012
* Author: savop
*/
#ifndef SETUP_H_
#define SETUP_H_
#include <vdr/plugin.h>
#include "../include/config.h"
#include "../include/tools.h"
#define STRING_SIZE 1024
class cMenuEditIpItem: public cMenuEditItem {
private:
char *value;
int curNum;
int pos;
bool step;
protected:
virtual void Set(void);
public:
cMenuEditIpItem(const char *Name, char *Value); // Value must be 16 bytes
~cMenuEditIpItem();
virtual eOSState ProcessKey(eKeys Key);
};
/**
* The VDR setup page
*
* This class shows and manages the settings within the VDR setup OSD
*
*/
class cMenuSetupUPnP : public cMenuSetupPage {
public:
cMenuSetupUPnP();
virtual ~cMenuSetupUPnP();
/**
* Processes a keystroke
*
* This processes a keystroke which is done by the user and updates the
* menu accordingly
*
* It returns the current state of the VDR after pressing a key
*
* @return The current state of the VDR
*/
virtual eOSState ProcessKey(
eKeys Key ///< Key, pressed by the user
);
static bool SetupParse(const char *Name, const char *Value, upnp::cConfig& config);
protected:
/**
* Stores the setup information
*
* This stores the setup information in the configuration file
*/
virtual void Store(void);
/**
* Update the menu
*
* This updates the menu osd and refreshes the screen.
*/
void Update(void);
/**
* Loads the setup information
*
* This loads the setup information from the configuration file
*/
void Load(void);
private:
cOsdItem *ctrlGenerate;
int switchExpertSettings;
int switchBindAddress;
int switchLive;
int interfaceIndex;
int upnpport;
int wsport;
int lvport;
int mRTime;
char webserverRoot[STRING_SIZE];
char presentationUrl[STRING_SIZE];
char address[16];
char interface[16];
char databaseDir[STRING_SIZE];
char deviceUUID[STRING_SIZE];
upnp::cConfig config;
void GetInterfaces();
int GetIndexOfInterface(std::string interface) const;
const char* interfaces[16];
int ifaceCount;
upnp::StringVector ifaceVector;
static std::string parsedArgs;
};
#endif /* SETUP_H_ */
|