From df9b8f8ae7a540988c20fdffaaff2442c349873a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 20 Jun 2014 21:31:41 -0700 Subject: Moving tokenize, percentEncode and percentDecode around. Fixing a few warnings. Workarounding c-ares and pthreads compilation issue with unicode. --- includes/BString.h | 3 +++ includes/CurlTask.h | 4 ---- includes/Http.h | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'includes') diff --git a/includes/BString.h b/includes/BString.h index 0a5fceb..dc9fd5d 100644 --- a/includes/BString.h +++ b/includes/BString.h @@ -134,6 +134,9 @@ class String : private std::string { bool isEmpty() { return std::string::empty(); } + std::vector tokenize(const String & delimiters = "&", bool trimEmpty = true); + + using std::string::npos; using std::string::size_type; }; diff --git a/includes/CurlTask.h b/includes/CurlTask.h index f1aba65..c5c085c 100644 --- a/includes/CurlTask.h +++ b/includes/CurlTask.h @@ -12,10 +12,6 @@ class CurlTask : public StacklessTask { virtual ~CurlTask(); friend class TaskMan; - static String percentEncode(const String & src); - static String percentDecode(const String & src); - static std::vector tokenize(const String & str, const String & delimiters = "&", bool trimEmpty = true); - virtual void prepareRequest() { } protected: diff --git a/includes/Http.h b/includes/Http.h index f0651f7..58edd23 100644 --- a/includes/Http.h +++ b/includes/Http.h @@ -15,8 +15,9 @@ namespace Balau { namespace Http { const char * getStatusMsg(int httpStatus); - const char * getContentType(const String & extension); +String percentEncode(const String & src); +String percentDecode(const String & src); typedef std::map StringMap; typedef std::multimap StringMultiMap; -- cgit v1.2.3