summaryrefslogtreecommitdiff
path: root/misc/menusetup.h
blob: ae40e97a8cd170d4b264c2282af1f5fd0d4f24d6 (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
/* 
 * File:   menusetup.h
 * Author: savop
 *
 * Created on 19. April 2009, 16:50
 */

#ifndef _CMENUSETUPUPNP_H
#define	_CMENUSETUPUPNP_H

#include <vdr/plugin.h>
#include "../server/server.h"
#include "config.h"

/**
 * The VDR setup page
 *
 * This class shows and manages the settings within the VDR setup OSD
 *
 * @author Denis Loh
 * @version 0.0.1
 */
class cMenuSetupUPnP : public cMenuSetupPage {
public:
    cMenuSetupUPnP();
//    virtual ~cMenuSetupUPnP();
    virtual eOSState ProcessKey(eKeys Key);
protected:
    virtual void Store(void);
    void Update(void);
    void Load(void);
private:
    const char* const* getInterfaceList(int *count);
    int getInterfaceIndex(const char* Interface);
    const char* getInterface(int Index);
    cOsdItem *mCtrlBind;
    cOsdItem *mCtrlEnabled;
    cOsdItem *mCtrlPort;
    cOsdItem *mCtrlAutoMode;
    cUPnPServer* mUpnpServer;
    /**
     * Is the server enabled or not
     *
     * The server can be switched on or off. If it is turned off, the server
     * will close open transmissions and ports
     *
     */
    int mEnable;
    int mAutoSetup;
    /**
     * The port to listen to (Default: 0 autodetect)
     *
     * The port the server is bound to. The default setting is 0.
     * So, the server will determine automatically a free random port between
     * 49152 and 65535. If a server should use a specific port it can be set
     * to one out of that range.
     *
     */
    int mPort;
    int mDetectPort;
    /**
     * The Interface the server is bound to
     *
     * If multiple interfaces exist the server can be bound to a specific
     * one
     *
     */
    int mInterfaceIndex;
    /**
     * The socket address of the server
     *
     * The IP address and the port of the server
     */
    char *mAddress;
};

#endif	/* _CMENUSETUPUPNP_H */