dmuratshin 9 years ago
parent
commit
0dc9a064b7

+ 6 - 0
oxygine/src/HttpRequestTask.cpp

@@ -45,6 +45,12 @@ namespace oxygine
         _setCacheEnabled(enabled);
     }
 
+    void HttpRequestTask::addHeader(const std::string& key, const std::string& value)
+    {
+        OX_ASSERT(!"not implemented");
+        _addHeader(key, value);
+    }
+
     const std::vector<unsigned char>&   HttpRequestTask::getPostData() const
     {
         return _postData;

+ 2 - 0
oxygine/src/HttpRequestTask.h

@@ -44,6 +44,7 @@ namespace oxygine
 
         /**swap version of getResponse if you want to modify result buffer inplace*/
         void getResponseSwap(std::vector<unsigned char>&);
+		void addHeader(const std::string &key, const std::string &value);
 
         void setPostData(const std::vector<unsigned char>& data);
         void setUrl(const std::string& url);
@@ -65,6 +66,7 @@ namespace oxygine
         virtual void _setUrl(const std::string& url) {}
         virtual void _setPostData(const std::vector<unsigned char>& data) {}
         virtual void _setCacheEnabled(bool enabled) {}
+		virtual void _addHeader(const std::string &key, const std::string &value) {}
 
         int _loaded;
         std::string _url;

+ 5 - 0
oxygine/src/res/Resources.cpp

@@ -344,6 +344,11 @@ namespace oxygine
         return _resources;
     }
 
+    Resources::resourcesMap& Resources::_getResourcesMap()
+    {
+        return _resourcesMap;
+    }
+
     Resource* Resources::get(const std::string& id_, error_policy ep) const
     {
         std::string id = lower(id_);

+ 7 - 5
oxygine/src/res/Resources.h

@@ -55,6 +55,12 @@ namespace oxygine
     {
     public:
         typedef std::vector<spResource> resources;
+#ifdef __S3E__
+		typedef std::map<std::string, spResource> resourcesMap;
+#else
+		typedef std::unordered_map<std::string, spResource> resourcesMap;
+#endif
+
         typedef Resource* (*createResourceCallback)(CreateResourceContext& context);
         typedef Closure<void (Resource*)> ResLoadedCallback;
 
@@ -117,6 +123,7 @@ namespace oxygine
         void collect(resources&);
 
         resources& _getResources();
+		resourcesMap& _getResourcesMap();
 
     protected:
         void updateName(const std::string& filename);
@@ -148,11 +155,6 @@ namespace oxygine
 
 
         resources _resources;
-#ifdef __S3E__
-        typedef std::map<std::string, spResource> resourcesMap;
-#else
-        typedef std::unordered_map<std::string, spResource> resourcesMap;
-#endif
         resourcesMap _resourcesMap;