Merge pull request #4775 from jmarshallnz/empty_episode_playcount
[vuplus_xbmc] / xbmc / network / GUIDialogNetworkSetup.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "guilib/GUIDialog.h"
24
25 class CGUIDialogNetworkSetup :
26       public CGUIDialog
27 {
28 public:
29   enum NET_PROTOCOL { NET_PROTOCOL_SMB = 0,
30                       NET_PROTOCOL_XBMSP,
31                       NET_PROTOCOL_FTP,
32                       NET_PROTOCOL_HTTP,
33                       NET_PROTOCOL_HTTPS,
34                       NET_PROTOCOL_DAV,
35                       NET_PROTOCOL_DAVS,
36                       NET_PROTOCOL_DAAP,
37                       NET_PROTOCOL_UPNP,
38                       NET_PROTOCOL_RSS,
39                       NET_PROTOCOL_HTSP,
40                       NET_PROTOCOL_VTP,
41                       NET_PROTOCOL_MYTH,
42                       NET_PROTOCOL_TUXBOX,
43                       NET_PROTOCOL_SFTP,
44                       NET_PROTOCOL_NFS, 
45                       NET_PROTOCOL_AFP};
46   CGUIDialogNetworkSetup(void);
47   virtual ~CGUIDialogNetworkSetup(void);
48   virtual bool OnMessage(CGUIMessage& message);
49   virtual bool OnBack(int actionID);
50   virtual void OnInitWindow();
51   virtual void OnWindowLoaded();
52   virtual void OnDeinitWindow(int nextWindowID);
53
54   static bool ShowAndGetNetworkAddress(CStdString &path);
55
56   CStdString ConstructPath() const;
57   void SetPath(const CStdString &path);
58   bool IsConfirmed() const { return m_confirmed; };
59
60 protected:
61   void OnProtocolChange();
62   void OnServerBrowse();
63   void OnOK();
64   void OnCancel();
65   void UpdateButtons();
66
67   NET_PROTOCOL m_protocol;
68   CStdString m_server;
69   CStdString m_path;
70   CStdString m_username;
71   CStdString m_password;
72   CStdString m_port;
73
74   bool m_confirmed;
75 };