summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/m_core.h6
-rw-r--r--include/m_protocols.h2
-rw-r--r--include/m_protosvc.h23
3 files changed, 13 insertions, 18 deletions
diff --git a/include/m_core.h b/include/m_core.h
index e29dc0f100..9ed2a86a9d 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -483,6 +483,12 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); };
///////////////////////////////////////////////////////////////////////////////
// text conversion functions
+typedef union {
+ char *a; // utf8 or ansi strings
+ TCHAR *t; // strings of TCHARs
+ wchar_t w; // strings of WCHARs
+} MAllStrings;
+
#ifdef _UNICODE
#define mir_t2a(s) mir_u2a(s)
#define mir_a2t(s) mir_a2u(s)
diff --git a/include/m_protocols.h b/include/m_protocols.h
index 15da03bc01..fb26cb58c0 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -105,8 +105,6 @@ typedef struct {
// when type == ACKTYPE_FILE && (result == ACKRESULT_DATA || result == ACKRESULT_FILERESUME),
// lParam points to this
-#define FNAMECHAR TCHAR
-
#define PFTS_RECEIVING 0
#define PFTS_SENDING 1
#define PFTS_UNICODE 2
diff --git a/include/m_protosvc.h b/include/m_protosvc.h
index 82a5291be2..9c9518b95f 100644
--- a/include/m_protosvc.h
+++ b/include/m_protosvc.h
@@ -323,23 +323,14 @@ will pick this up and everything will be good.
#define PSR_TCHAR 0
#endif
-
typedef struct {
int cbSize;
- FNAMECHAR *nick;
- FNAMECHAR *firstName;
- FNAMECHAR *lastName;
- FNAMECHAR *email;
- FNAMECHAR *id;
+ MAllStrings nick;
+ MAllStrings firstName;
+ MAllStrings lastName;
+ MAllStrings email;
+ MAllStrings id;
int flags;
- char reserved[8*sizeof(HANDLE)/sizeof(DWORD)];
- //Protocols may extend this structure with extra members at will and supply
- //a larger cbSize to reflect the new information, but they must not change
- //any elements above this comment
- //The 'reserved' field is part of the basic structure, not space to
- //overwrite with protocol-specific information.
- //If modules do this, they should take steps to ensure that information
- //they put there will be retained by anyone trying to save this structure.
} PROTOSEARCHRESULT;
#define PS_BASICSEARCH "/BasicSearch"
#define PS_BASICSEARCHW "/BasicSearchW"
@@ -395,7 +386,7 @@ typedef struct {
typedef struct {
size_t nSize;
int nFieldCount;
- TCHAR ** pszFields;
+ TCHAR **pszFields;
PROTOSEARCHRESULT psr;
} CUSTOMSEARCHRESULTS;
@@ -446,7 +437,7 @@ typedef struct {
#define FILERESUME_SKIP 4
typedef struct {
int action; //a FILERESUME_ flag
- const FNAMECHAR *szFilename; //full path. Only valid if action == FILERESUME_RENAME
+ const TCHAR *szFilename; // full path. Only valid if action == FILERESUME_RENAME
} PROTOFILERESUME;
#define PS_FILERESUME "/FileResume"
#define PS_FILERESUMEW "/FileResumeW"