diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-20 13:36:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-20 13:36:00 +0000 |
commit | 5b378496114ec47ffa27d3d9e7bc2a744d9e0a77 (patch) | |
tree | f7550dadde23f61182af6e542101eb5fedfa2d85 /protocols/IcqOscarJ/src/icq_xstatus.cpp | |
parent | 0ba80eef50988ca3e88a16839eaf0a840f1cb139 (diff) |
- all xstatus services moved to m_xstatus.h
- old obsoleted services PS_GETXSTATUS & PS_SETXSTATUS removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@2390 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_xstatus.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_xstatus.cpp | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 9802b1dee7..3c293eb48b 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -974,39 +974,13 @@ INT_PTR CIcqProto::ShowXStatusDetails(WPARAM wParam, LPARAM lParam) return 0;
}
-INT_PTR CIcqProto::SetXStatus(WPARAM wParam, LPARAM lParam)
-{
- if (!m_bXStatusEnabled && !m_bMoodsEnabled)
- return 0;
-
- if (wParam >= 0 && wParam <= XSTATUS_COUNT) {
- setXStatusEx((BYTE)wParam, 1);
- return wParam;
- }
- return 0;
-}
-
-INT_PTR CIcqProto::GetXStatus(WPARAM wParam, LPARAM lParam)
-{
- if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 0;
-
- if (!icqOnline()) return 0;
-
- BYTE status = getContactXStatus(NULL);
-
- if (wParam) *((char**)wParam) = m_bXStatusEnabled ? DBSETTING_XSTATUS_NAME : NULL;
- if (lParam) *((char**)lParam) = DBSETTING_XSTATUS_MSG;
-
- return status;
-}
-
INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam)
{
- ICQ_CUSTOM_STATUS *pData = (ICQ_CUSTOM_STATUS*)lParam;
+ CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1;
- if (pData->cbSize < sizeof(ICQ_CUSTOM_STATUS)) return 1; // Failure
+ if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure
if (pData->flags & CSSF_MASK_STATUS) { // set custom status
int status = *pData->status;
@@ -1052,12 +1026,12 @@ INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam) INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam)
{
- ICQ_CUSTOM_STATUS *pData = (ICQ_CUSTOM_STATUS*)lParam;
+ CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
HANDLE hContact = (HANDLE)wParam;
if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1;
- if (pData->cbSize < sizeof(ICQ_CUSTOM_STATUS)) return 1; // Failure
+ if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
@@ -1066,7 +1040,7 @@ INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam) // fill status name member
if (pData->flags & CSSF_MASK_NAME) {
if (pData->flags & CSSF_DEFAULT_NAME) {
- int status = *pData->wParam;
+ int status = (pData->wParam == NULL) ? getContactXStatus(hContact) : *pData->wParam;
if (status < 1 || status > XSTATUS_COUNT)
return 1; // Failure
|