mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 20:52:30 +02:00
Tabs -> spaces (yes this breaks compatiblity with upstream)
This commit is contained in:
parent
5d78e2f5e4
commit
4412dd198d
96 changed files with 22253 additions and 22254 deletions
98
util.h
98
util.h
|
@ -14,61 +14,61 @@ namespace i2p
|
|||
{
|
||||
namespace util
|
||||
{
|
||||
namespace config
|
||||
{
|
||||
extern std::map<std::string, std::string> mapArgs;
|
||||
extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
|
||||
void OptionParser(int argc, const char* const argv[]);
|
||||
int GetArg(const std::string& strArg, int nDefault);
|
||||
std::string GetArg(const std::string& strArg, const std::string& strDefault);
|
||||
const char* GetCharArg(const std::string& strArg, const std::string& nDefault);
|
||||
}
|
||||
namespace config
|
||||
{
|
||||
extern std::map<std::string, std::string> mapArgs;
|
||||
extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
|
||||
void OptionParser(int argc, const char* const argv[]);
|
||||
int GetArg(const std::string& strArg, int nDefault);
|
||||
std::string GetArg(const std::string& strArg, const std::string& strDefault);
|
||||
const char* GetCharArg(const std::string& strArg, const std::string& nDefault);
|
||||
}
|
||||
|
||||
namespace filesystem
|
||||
{
|
||||
void SetAppName (const std::string& name);
|
||||
std::string GetAppName ();
|
||||
namespace filesystem
|
||||
{
|
||||
void SetAppName (const std::string& name);
|
||||
std::string GetAppName ();
|
||||
|
||||
const boost::filesystem::path &GetDataDir();
|
||||
std::string GetFullPath (const std::string& filename);
|
||||
boost::filesystem::path GetDefaultDataDir();
|
||||
boost::filesystem::path GetConfigFile();
|
||||
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet,
|
||||
const boost::filesystem::path &GetDataDir();
|
||||
std::string GetFullPath (const std::string& filename);
|
||||
boost::filesystem::path GetDefaultDataDir();
|
||||
boost::filesystem::path GetConfigFile();
|
||||
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet,
|
||||
std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
|
||||
boost::filesystem::path GetCertificatesDir();
|
||||
}
|
||||
boost::filesystem::path GetCertificatesDir();
|
||||
}
|
||||
|
||||
namespace http
|
||||
{
|
||||
const char ETAG[] = "ETag";
|
||||
const char IF_NONE_MATCH[] = "If-None-Match";
|
||||
const char IF_MODIFIED_SINCE[] = "If-Modified-Since";
|
||||
const char LAST_MODIFIED[] = "Last-Modified";
|
||||
const char TRANSFER_ENCODING[] = "Transfer-Encoding";
|
||||
namespace http
|
||||
{
|
||||
const char ETAG[] = "ETag";
|
||||
const char IF_NONE_MATCH[] = "If-None-Match";
|
||||
const char IF_MODIFIED_SINCE[] = "If-Modified-Since";
|
||||
const char LAST_MODIFIED[] = "Last-Modified";
|
||||
const char TRANSFER_ENCODING[] = "Transfer-Encoding";
|
||||
|
||||
std::string httpRequest(const std::string& address);
|
||||
std::string GetHttpContent (std::istream& response);
|
||||
void MergeChunkedResponse (std::istream& response, std::ostream& merged);
|
||||
int httpRequestViaI2pProxy(const std::string& address, std::string &content); // return http code
|
||||
std::string urlDecode(const std::string& data);
|
||||
|
||||
struct url {
|
||||
url(const std::string& url_s); // omitted copy, ==, accessors, ...
|
||||
private:
|
||||
void parse(const std::string& url_s);
|
||||
public:
|
||||
std::string protocol_, host_, path_, query_;
|
||||
std::string portstr_;
|
||||
unsigned int port_;
|
||||
std::string user_;
|
||||
std::string pass_;
|
||||
};
|
||||
}
|
||||
std::string httpRequest(const std::string& address);
|
||||
std::string GetHttpContent (std::istream& response);
|
||||
void MergeChunkedResponse (std::istream& response, std::ostream& merged);
|
||||
int httpRequestViaI2pProxy(const std::string& address, std::string &content); // return http code
|
||||
std::string urlDecode(const std::string& data);
|
||||
|
||||
struct url {
|
||||
url(const std::string& url_s); // omitted copy, ==, accessors, ...
|
||||
private:
|
||||
void parse(const std::string& url_s);
|
||||
public:
|
||||
std::string protocol_, host_, path_, query_;
|
||||
std::string portstr_;
|
||||
unsigned int port_;
|
||||
std::string user_;
|
||||
std::string pass_;
|
||||
};
|
||||
}
|
||||
|
||||
namespace net
|
||||
{
|
||||
int GetMTU (const boost::asio::ip::address& localAddress);
|
||||
}
|
||||
namespace net
|
||||
{
|
||||
int GetMTU (const boost::asio::ip::address& localAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue