1 /**
2  * @file mega/proxy.h
3  * @brief Class for manipulating proxy data
4  *
5  * (c) 2013-2014 by Mega Limited, Auckland, New Zealand
6  *
7  * This file is part of the MEGA SDK - Client Access Engine.
8  *
9  * Applications using the MEGA API must present a valid application key
10  * and comply with the the rules set forth in the Terms of Service.
11  *
12  * The MEGA SDK 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.
15  *
16  * @copyright Simplified (2-clause) BSD License.
17  *
18  * You should have received a copy of the license along with this
19  * program.
20  */
21 
22 #ifndef PROXY_H
23 #define PROXY_H
24 
25 #include "mega/types.h"
26 #include <string>
27 
28 namespace mega {
29 struct MEGA_API Proxy
30 {
31 public:
32     enum ProxyType {NONE = 0, AUTO = 1, CUSTOM = 2};
33 
34     Proxy();
35     void setProxyType(int proxyType);
36     void setProxyURL(std::string *proxyURL);
37     void setCredentials(std::string *username, std::string *password);
38     int getProxyType();
39     std::string getProxyURL();
40     bool credentialsNeeded();
41     std::string getUsername();
42     std::string getPassword();
43 
44 protected:
45     int proxyType;
46     std::string proxyURL;
47     std::string username;
48     std::string password;
49 };
50 } // namespace
51 
52 #endif // PROXY_H
53