summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/conv.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
commit48540940b6c28bb4378abfeb500ec45a625b37b6 (patch)
tree2ef294c0763e802f91d868bdef4229b6868527de /protocols/AimOscar/conv.h
parent5c350913f011e119127baeb32a6aedeb4f0d33bc (diff)
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar/conv.h')
-rw-r--r--protocols/AimOscar/conv.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/protocols/AimOscar/conv.h b/protocols/AimOscar/conv.h
new file mode 100644
index 0000000000..b7490cf63e
--- /dev/null
+++ b/protocols/AimOscar/conv.h
@@ -0,0 +1,56 @@
+/*
+Plugin of Miranda IM for communicating with users of the AIM protocol.
+Copyright (c) 2008-2009 Boris Krasnovskiy
+Copyright (C) 2005-2006 Aaron Myles Landwehr
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef CONV_H
+#define CONV_H
+
+char* process_status_msg (const char *src, const char* sn);
+void html_decode(char* str);
+char* html_encode(const char *src);
+char* html_to_bbcodes(char *src);
+char* bbcodes_to_html(const char *src);
+void strip_tag(char* begin, char* end);
+char* strip_tag_within(char* begin, char* end);
+char* rtf_to_html(HWND hwndDlg,int DlgItem);
+void wcs_htons(wchar_t * ch);
+char* bytes_to_string(char* bytes, int num_bytes);
+void string_to_bytes(char* string, char* bytes);
+bool is_utf(const char* msg);
+char* get_fname(char* path);
+TCHAR* get_dir(TCHAR* path);
+
+struct aimString
+{
+ union
+ {
+ char* szString;
+ wchar_t* wszString;
+ };
+ size_t size;
+ bool unicode;
+
+ aimString(char* str);
+ ~aimString() { mir_free(szString); }
+
+ bool isUnicode(void) { return unicode; }
+ unsigned short getSize(void) { return (unsigned short)size; }
+ unsigned short getTermSize(void) { return (unsigned short)(size + (unicode ? sizeof(wchar_t) : sizeof(char))); }
+ char* getBuf(void) { return szString; }
+};
+
+#endif