summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorSzymon Tokarz <wsx22@o2.pl>2014-11-13 00:05:26 +0000
committerSzymon Tokarz <wsx22@o2.pl>2014-11-13 00:05:26 +0000
commit4ca096262dfc106d1a2207145544cbd3e84e67cb (patch)
treeb84d369c1e4dcf3b38c8acd9d1f3e9202e17ec0a /protocols
parentbef877078d09d6162c1e8565bd34b22fbd9ace69 (diff)
Sametime protocol:
- Support the Sametime 'in meeting' status (linked with Miranda 'Occupied' status) - New protocol icons from oryginal client Patch by pepinlebref git-svn-id: http://svn.miranda-ng.org/main/trunk@10976 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Sametime/proto_sametime/res/Away.icobin318 -> 3446 bytes
-rw-r--r--protocols/Sametime/proto_sametime/res/DND.icobin318 -> 3446 bytes
-rw-r--r--protocols/Sametime/proto_sametime/res/Occupied.icobin0 -> 3446 bytes
-rw-r--r--protocols/Sametime/proto_sametime/res/Offline.icobin318 -> 5238 bytes
-rw-r--r--protocols/Sametime/proto_sametime/res/Online.icobin318 -> 3446 bytes
-rw-r--r--protocols/Sametime/proto_sametime/res/Proto_Sametime.rc18
-rw-r--r--protocols/Sametime/proto_sametime/src/resource.h9
-rw-r--r--protocols/Sametime/src/meanwhile/src/mw_common.h11
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp5
-rw-r--r--protocols/Sametime/src/sametime_session.cpp11
-rw-r--r--protocols/Sametime/src/userlist.cpp9
11 files changed, 41 insertions, 22 deletions
diff --git a/protocols/Sametime/proto_sametime/res/Away.ico b/protocols/Sametime/proto_sametime/res/Away.ico
index 6204baa145..9f89cc0175 100644
--- a/protocols/Sametime/proto_sametime/res/Away.ico
+++ b/protocols/Sametime/proto_sametime/res/Away.ico
Binary files differ
diff --git a/protocols/Sametime/proto_sametime/res/DND.ico b/protocols/Sametime/proto_sametime/res/DND.ico
index f198b121f5..57c5aa3221 100644
--- a/protocols/Sametime/proto_sametime/res/DND.ico
+++ b/protocols/Sametime/proto_sametime/res/DND.ico
Binary files differ
diff --git a/protocols/Sametime/proto_sametime/res/Occupied.ico b/protocols/Sametime/proto_sametime/res/Occupied.ico
new file mode 100644
index 0000000000..4a09a93cfb
--- /dev/null
+++ b/protocols/Sametime/proto_sametime/res/Occupied.ico
Binary files differ
diff --git a/protocols/Sametime/proto_sametime/res/Offline.ico b/protocols/Sametime/proto_sametime/res/Offline.ico
index 323f880ce5..e2912b633e 100644
--- a/protocols/Sametime/proto_sametime/res/Offline.ico
+++ b/protocols/Sametime/proto_sametime/res/Offline.ico
Binary files differ
diff --git a/protocols/Sametime/proto_sametime/res/Online.ico b/protocols/Sametime/proto_sametime/res/Online.ico
index 839e79c9f7..18e6e820c2 100644
--- a/protocols/Sametime/proto_sametime/res/Online.ico
+++ b/protocols/Sametime/proto_sametime/res/Online.ico
Binary files differ
diff --git a/protocols/Sametime/proto_sametime/res/Proto_Sametime.rc b/protocols/Sametime/proto_sametime/res/Proto_Sametime.rc
index 2553b55145..f2aa97435a 100644
--- a/protocols/Sametime/proto_sametime/res/Proto_Sametime.rc
+++ b/protocols/Sametime/proto_sametime/res/Proto_Sametime.rc
@@ -13,10 +13,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Russian (Russia) resources
+// Neutral resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -51,11 +52,12 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ICON1 ICON "Offline.ico"
-IDI_ICON2 ICON "Online.ico"
-IDI_ICON3 ICON "Away.ico"
-IDI_ICON4 ICON "DND.ico"
-#endif // Russian (Russia) resources
+IDI_ONLINE ICON "Online.ico"
+IDI_AWAY ICON "Away.ico"
+IDI_DND ICON "DND.ico"
+IDI_OFFLINE ICON "Offline.ico"
+IDI_OCCUPIED ICON "Occupied.ico"
+#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Sametime/proto_sametime/src/resource.h b/protocols/Sametime/proto_sametime/src/resource.h
index 3decee6cf7..e4fb5b5339 100644
--- a/protocols/Sametime/proto_sametime/src/resource.h
+++ b/protocols/Sametime/proto_sametime/src/resource.h
@@ -2,10 +2,11 @@
// Microsoft Visual C++ generated include file.
// Used by Proto_Sametime.rc
//
-#define IDI_ICON1 105
-#define IDI_ICON2 104
-#define IDI_ICON3 128
-#define IDI_ICON4 158
+#define IDI_ONLINE 104
+#define IDI_OFFLINE 105
+#define IDI_AWAY 128
+#define IDI_DND 158
+#define IDI_OCCUPIED 159
// Next default values for new objects
//
diff --git a/protocols/Sametime/src/meanwhile/src/mw_common.h b/protocols/Sametime/src/meanwhile/src/mw_common.h
index 1294da4959..6138ce1b4d 100644
--- a/protocols/Sametime/src/meanwhile/src/mw_common.h
+++ b/protocols/Sametime/src/meanwhile/src/mw_common.h
@@ -153,10 +153,13 @@ struct mwPrivacyInfo {
/* 8.3.5 User Status Types */
enum mwStatusType {
- mwStatus_ACTIVE = 0x0020,
- mwStatus_IDLE = 0x0040,
- mwStatus_AWAY = 0x0060,
- mwStatus_BUSY = 0x0080,
+ mwStatus_ACTIVE = 0x0020,
+ mwStatus_IDLE = 0x0040,
+ mwStatus_AWAY = 0x0060,
+ mwStatus_BUSY = 0x0080,
+ /// Miranda NG development start
+ mwStatus_IN_MEETING = 0x0008,
+ /// Miranda NG development end
};
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp
index 86fe836557..6037abcc7d 100644
--- a/protocols/Sametime/src/sametime_proto.cpp
+++ b/protocols/Sametime/src/sametime_proto.cpp
@@ -160,14 +160,11 @@ DWORD_PTR CSametimeProto::GetCaps(int type, MCONTACT hContact)
ret = PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_LIGHTDND;
break;
case PFLAGNUM_3:
- ret = PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND;
+ ret = PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_LIGHTDND;
break;
case PFLAGNUM_4:
ret = PF4_SUPPORTTYPING | PF4_IMSENDUTF;
break;
- case PFLAGNUM_5:
- ret = PF2_LIGHTDND;
- break;
case PFLAG_UNIQUEIDTEXT:
ret = (DWORD_PTR)Translate("ID");
break;
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp
index 64b5894f28..358ab48c00 100644
--- a/protocols/Sametime/src/sametime_session.cpp
+++ b/protocols/Sametime/src/sametime_session.cpp
@@ -11,6 +11,7 @@ struct {
char* szOnline;
char* szAway;
char* szDND;
+ char* szOccupied; // away msg for 'in meeting' status
} AwayMessages;
void __cdecl SessionClear(mwSession* session)
@@ -206,7 +207,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session)
}
break;
- case 8: // new 'in a meeting' status, not handled by meanwhile lib
+ case mwStatus_IN_MEETING: // new 'in meeting' status
new_status = ID_STATUS_OCCUPIED;
break;
@@ -264,7 +265,9 @@ int CSametimeProto::SetSessionStatus(int status)
case ID_STATUS_AWAY:
us.desc = AwayMessages.szAway; us.status = mwStatus_AWAY;
break;
- case ID_STATUS_OCCUPIED:
+ case ID_STATUS_OCCUPIED: // link 'Occupied' MIR_NG status with 'in meeting' Sametime status
+ us.desc = AwayMessages.szOccupied; us.status = mwStatus_IN_MEETING;
+ break;
case ID_STATUS_DND:
us.desc = AwayMessages.szDND; us.status = mwStatus_BUSY;
break;
@@ -324,6 +327,8 @@ void CSametimeProto::SetSessionAwayMessage(int status, const PROTOCHAR* msgT)
replaceStr(AwayMessages.szAway, msg);
else if (status == ID_STATUS_DND)
replaceStr(AwayMessages.szDND, msg);
+ else if (status == ID_STATUS_OCCUPIED)
+ replaceStr(AwayMessages.szOccupied, msg); // manage Occupied as away message
else
return; // unsupported status
@@ -528,6 +533,7 @@ void CSametimeProto::InitAwayMsg()
AwayMessages.szOnline = 0;
AwayMessages.szAway = 0;
AwayMessages.szDND = 0;
+ AwayMessages.szOccupied = 0;
}
void CSametimeProto::DeinitAwayMsg()
@@ -535,6 +541,7 @@ void CSametimeProto::DeinitAwayMsg()
mir_free(AwayMessages.szOnline);
mir_free(AwayMessages.szAway);
mir_free(AwayMessages.szDND);
+ mir_free(AwayMessages.szOccupied);
}
void SendAnnouncement(SendAnnouncementFunc_arg* arg)
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp
index 9791033b00..2523182785 100644
--- a/protocols/Sametime/src/userlist.cpp
+++ b/protocols/Sametime/src/userlist.cpp
@@ -484,6 +484,9 @@ void mwAwareList_on_aware(mwAwareList* list, mwAwareSnapshot* aware)
case mwStatus_BUSY:
new_status = ID_STATUS_DND;
break;
+ case mwStatus_IN_MEETING: // link 'in meeting' Sametime status
+ new_status = ID_STATUS_OCCUPIED; // with 'Occupied' MIR_NG status
+ break;
}
if (new_status != ID_STATUS_IDLE) //SetSessionStatus(new_status);
proto->UpdateSelfStatus();
@@ -541,6 +544,12 @@ void mwAwareList_on_aware(mwAwareList* list, mwAwareSnapshot* aware)
db_set_w(hContact, proto->m_szModuleName, "Status", new_status);
db_set_dw(hContact, proto->m_szModuleName, "IdleTS", 0);
break;
+ case mwStatus_IN_MEETING:
+ // link 'in meeting' Sametime status to 'Occipied' MIR_NG status
+ new_status = ID_STATUS_OCCUPIED;
+ db_set_w(hContact, proto->m_szModuleName, "Status", new_status);
+ db_set_dw(hContact, proto->m_szModuleName, "IdleTS", 0);
+ break;
}
}
else