Debian Codegraph @

CodeLite/SocketAPI/clConnectionString.h

raw
1 #ifndef CLCONNECTIONSTRING_H
2 #define CLCONNECTIONSTRING_H
3
4 #include <codelite_exports.h>
5 #include <wx/string.h>
6
7 class WXDLLIMPEXP_CL clConnectionString
8 {
9 public:
10 enum eProtocol {
11 kTcp,
12 kUnixLocalSocket,
13 };
14
15 protected:
16 eProtocol m_protocol;
17 wxString m_host;
18 long m_port;
19 wxString m_path;
20 bool m_isOK;
21
22 protected:
23 void DoParse(const wxString& connectionString);
24
25 public:
26 clConnectionString(const wxString& connectionString);
27 ~clConnectionString();
28
29 void SetHost(const wxString& host) { this->m_host = host; }
30 void SetIsOK(bool isOK) { this->m_isOK = isOK; }
31 void SetPath(const wxString& path) { this->m_path = path; }
32 void SetPort(long port) { this->m_port = port; }
33 void SetProtocol(const eProtocol& protocol) { this->m_protocol = protocol; }
34 const wxString& GetHost() const { return m_host; }
35 bool IsOK() const { return m_isOK; }
36 const wxString& GetPath() const { return m_path; }
37 long GetPort() const { return m_port; }
38 const eProtocol& GetProtocol() const { return m_protocol; }
39 };
40
41 #endif // CLCONNECTIONSTRING_H