diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-01 18:10:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-01 18:10:32 +0000 |
commit | 2bb514f4195c99b52e0ec748c975c0fd30dbbd25 (patch) | |
tree | e7325f314a828e1233b89ef688e6e52a8846925a /include | |
parent | a59538975c7fef04bcbf9e62b81c78753ac2a16c (diff) |
another bunch of dead crutches: non-unicode avatar services
git-svn-id: http://svn.miranda-ng.org/main/trunk@13961 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_protocols.inc | 15 | ||||
-rw-r--r-- | include/m_avatars.h | 25 | ||||
-rw-r--r-- | include/m_protocols.h | 34 | ||||
-rw-r--r-- | include/m_string.h | 8 |
4 files changed, 17 insertions, 65 deletions
diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc index 7fd40cd657..8e3bd4d455 100644 --- a/include/delphi/m_protocols.inc +++ b/include/delphi/m_protocols.inc @@ -395,22 +395,12 @@ const PA_FORMAT_XML = 7;
type
- PPROTO_AVATAR_INFORMATIONW = ^TPROTO_AVATAR_INFORMATIONW;
- TPROTO_AVATAR_INFORMATIONW = record
- cbSize : int; // sizeof()
- hContact: TMCONTACT; // this might have to be set by the caller too
- format : int; // PA_FORMAT_*
- // full path to filename which contains the avatar
- filename: array[0..(MAX_PATH)-1] of WideChar;
- end;
-
PPROTO_AVATAR_INFORMATION = ^TPROTO_AVATAR_INFORMATION;
TPROTO_AVATAR_INFORMATION = record
- cbSize : int; // sizeof()
hContact: TMCONTACT; // this might have to be set by the caller too
format : int; // PA_FORMAT_*
// full path to filename which contains the avatar
- filename: array[0..(MAX_PATH)-1] of AnsiChar;
+ filename: array[0..(MAX_PATH)-1] of WideChar;
end;
const
@@ -425,10 +415,7 @@ const lParam : (LPARAM) &PROTO_AVATAR_INFORMATION
Affect : Make a request to the protocol to return information about a hContact's avatar (or main user)
it can return information, tell you there is none, or if forced start requesting an avatar.
- Note:
- Version: 0.3.4+ (2004/09/13)
}
PS_GETAVATARINFO = '/GetAvatarInformation';
- PS_GETAVATARINFOW = '/GetAvatarInformationW';
{$ENDIF}
diff --git a/include/m_avatars.h b/include/m_avatars.h index 78b0b2f69f..4bcdf96229 100644 --- a/include/m_avatars.h +++ b/include/m_avatars.h @@ -254,40 +254,25 @@ typedef struct _contactAvatarChangedNotification { /*
wParam=0
-lParam=(const char *)Avatar file name or NULL to remove the avatar
+lParam=(const TCHAR*)Avatar file name or NULL to remove the avatar
return=0 for sucess
*/
#define PS_SETMYAVATAR "/SetMyAvatar"
/*
-wParam=(char *)Buffer to file name
+wParam=(TCHAR*)Buffer to file name
lParam=(int)Buffer size
return=0 for sucess
*/
#define PS_GETMYAVATAR "/GetMyAvatar"
-#ifdef _UNICODE
-
-#define PS_SETMYAVATARW "/SetMyAvatarW"
-#define PS_GETMYAVATARW "/GetMyAvatarW"
-
-#define PS_GETMYAVATART PS_GETMYAVATARW
-#define PS_SETMYAVATART PS_SETMYAVATARW
-
-#else
-
-#define PS_GETMYAVATART PS_GETMYAVATAR
-#define PS_SETMYAVATART PS_SETMYAVATAR
-
-#endif
-
-#define PIP_NONE 0
-#define PIP_SQUARE 1
+#define PIP_NONE 0
+#define PIP_SQUARE 1
// Avatar image max size
// lParam = (POINT*) maxSize (use -1 for no max)
// return 0 for success
-#define AF_MAXSIZE 1
+#define AF_MAXSIZE 1
// Avatar image proportion
// lParam = 0
diff --git a/include/m_protocols.h b/include/m_protocols.h index fb26cb58c0..cb6fd2ac38 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -426,44 +426,24 @@ ProtoBroadcastAck(), listeners must hook ME_PROTO_ACK, note that lParam = ACKDAT #define PA_FORMAT_XML 7
typedef struct {
- int cbSize; // sizeof()
- MCONTACT hContact; // this might have to be set by the caller too
- int format; // PA_FORMAT_*
- char filename[MAX_PATH]; // full path to filename which contains the avatar
-} PROTO_AVATAR_INFORMATION;
-
-#ifdef _UNICODE
-typedef struct {
- int cbSize; // sizeof()
- MCONTACT hContact; // this might have to be set by the caller too
+ MCONTACT hContact; // this might have to be set by the caller too
int format; // PA_FORMAT_*
WCHAR filename[MAX_PATH]; // full path to filename which contains the avatar
-} PROTO_AVATAR_INFORMATIONW;
-#endif
+} PROTO_AVATAR_INFORMATION;
-#define GAIF_FORCE 1 // force an update of the avatar if there is none
+#define GAIF_FORCE 1 // force an update of the avatar if there is none
-#define GAIR_SUCCESS 0 // information about the avatar has been returned
-#define GAIR_WAITFOR 1 // you must hook ME_PROTO_ACK and wait for replies about avatar status
-#define GAIR_NOAVATAR 2 // sorry, this contact has no avatars
+#define GAIR_SUCCESS 0 // information about the avatar has been returned
+#define GAIR_WAITFOR 1 // you must hook ME_PROTO_ACK and wait for replies about avatar status
+#define GAIR_NOAVATAR 2 // sorry, this contact has no avatars
/*
wParam : GAIF_*
lParam : (LPARAM) &PROTO_AVATAR_INFORMATION
Affect : Make a request to the protocol to return information about a hContact's avatar (or main user)
it can return information, tell you there is none, or if forced start requesting an avatar.
- Note:
- Version: 0.3.4+ (2004/09/13)
*/
-#define PS_GETAVATARINFO "/GetAvatarInformation"
-#ifdef _UNICODE
- #define PS_GETAVATARINFOW "/GetAvatarInformationW"
- #define PS_GETAVATARINFOT PS_GETAVATARINFOW
+#define PS_GETAVATARINFO "/GetAvatarInformation"
- #define PROTO_AVATAR_INFORMATIONT PROTO_AVATAR_INFORMATIONW
-#else
- #define PS_GETAVATARINFOT PS_GETAVATARINFO
- #define PROTO_AVATAR_INFORMATIONT PROTO_AVATAR_INFORMATION
-#endif
#endif // M_PROTOCOLS_H
diff --git a/include/m_string.h b/include/m_string.h index 4619222fe9..5fe5990fb9 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -607,18 +607,18 @@ public: return _vscwprintf(pszFormat, args);
}
- static int __stdcall Format(LPWSTR pszBuffer, LPCWSTR pszFormat, va_list args)
- {
#pragma warning (push)
#pragma warning(disable : 4996)
- return vswprintf(pszBuffer, pszFormat, args); //!!!!!!!!!
-#pragma warning (pop)
+ static int __stdcall Format(LPWSTR pszBuffer, LPCWSTR pszFormat, va_list args)
+ {
+ return vswprintf(pszBuffer, pszFormat, args);
}
static int __stdcall Format(LPWSTR pszBuffer, size_t nLength, LPCWSTR pszFormat, va_list args)
{
return _vsnwprintf(pszBuffer, nLength, pszFormat, args);
}
+#pragma warning (pop)
static int __stdcall GetBaseTypeLength(LPCSTR pszSrc)
{
|