summaryrefslogtreecommitdiff
path: root/protocols/Twitter/http.cpp
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-06 20:17:58 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-06 20:17:58 +0000
commitab92c2a5cd5427bf8a33d06afdb64b88d2d640ed (patch)
treefc82f068ad7bf8e141b6148f2ff191eab56e1f5a /protocols/Twitter/http.cpp
parent441daff7dfc4cd80075cfbec3345192aab4353b5 (diff)
Twitter updated
git-svn-id: http://svn.miranda-ng.org/main/trunk@337 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/http.cpp')
-rw-r--r--protocols/Twitter/http.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/protocols/Twitter/http.cpp b/protocols/Twitter/http.cpp
index 63218ca616..ef295f4ab0 100644
--- a/protocols/Twitter/http.cpp
+++ b/protocols/Twitter/http.cpp
@@ -15,23 +15,16 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "common.h"
#include "http.h"
-std::string http::url_encode(const std::string &s)
-{
- char *encoded = (char*)CallService( MS_NETLIB_URLENCODE, 0, ( LPARAM )s.c_str());
- std::string ret = encoded;
- HeapFree(GetProcessHeap(),0,encoded);
+#include <windows.h>
+#include <newpluginapi.h>
+#include <m_netlib.h>
- return ret;
-}
-
-std::string http::url_encode(const std::wstring &s)
+std::string http::url_encode(const std::string &s)
{
- char* data = mir_u2a( s.c_str());
- char *encoded = (char*)CallService( MS_NETLIB_URLENCODE, 0, ( LPARAM )data);
- mir_free( data );
+ char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
+ 0,reinterpret_cast<LPARAM>(s.c_str()) ));
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);