summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2008-07-14 10:59:12 +0000
committer(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2008-07-14 10:59:12 +0000
commit41ecb0a9c99c25f1767da2c25db3484434421e40 (patch)
tree566e95af04daadc2ca2707aea1e15beec57a143d
parent228aa467601ce154733757f7072f573eec926659 (diff)
client version change, added option to revert
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@420 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--sametime/options.cpp8
-rw-r--r--sametime/options.h1
-rw-r--r--sametime/resource.h37
-rw-r--r--sametime/resource.rc79
-rw-r--r--sametime/sametime.cpp2
-rw-r--r--sametime/sametime.sln4
-rw-r--r--sametime/sametime.vcproj17
-rw-r--r--sametime/session.cpp11
8 files changed, 79 insertions, 80 deletions
diff --git a/sametime/options.cpp b/sametime/options.cpp
index 80c9444..438fab2 100644
--- a/sametime/options.cpp
+++ b/sametime/options.cpp
@@ -47,6 +47,7 @@ static BOOL CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
CheckDlgButton(hwndDlg, IDC_CHK_ADDCONTACTS, options.add_contacts ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_CHK_IDLEAWAY, options.idle_as_away ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_CHK_OLDDEFAULTVER, options.use_old_default_client_ver ? TRUE : FALSE);
{
SendDlgItemMessage(hwndDlg, IDC_CMB_CLIENT, CB_RESETCONTENT, 0, 0);
int pos = 0;
@@ -167,6 +168,7 @@ static BOOL CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case IDC_CHK_USERCP:
case IDC_CHK_ADDCONTACTS:
case IDC_CHK_IDLEAWAY:
+ case IDC_CHK_OLDDEFAULTVER:
case IDC_RAD_ENC:
case IDC_RAD_NOENC:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -232,6 +234,8 @@ static BOOL CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
options.encrypt_session = (IsDlgButtonChecked(hwndDlg, IDC_RAD_ENC) != FALSE);
options.idle_as_away = (IsDlgButtonChecked(hwndDlg, IDC_CHK_IDLEAWAY) != FALSE);
+ options.use_old_default_client_ver = (IsDlgButtonChecked(hwndDlg, IDC_CHK_OLDDEFAULTVER) != FALSE);
+
SaveOptions();
return TRUE;
@@ -296,6 +300,8 @@ void LoadOptions() {
options.add_contacts = (DBGetContactSettingByte(0, PROTO, "AutoAddContacts", 0) == 1);
options.encrypt_session = (DBGetContactSettingByte(0, PROTO, "EncryptSession", 0) == 1);
options.idle_as_away = (DBGetContactSettingByte(0, PROTO, "IdleAsAway", 1) == 1);
+
+ options.use_old_default_client_ver = (DBGetContactSettingByte(0, PROTO, "UseOldClientVer", 0) == 1);
}
void SaveOptions() {
@@ -317,4 +323,6 @@ void SaveOptions() {
DBWriteContactSettingByte(0, PROTO, "AutoAddContacts", options.add_contacts ? 1 : 0);
DBWriteContactSettingByte(0, PROTO, "EncryptSession", options.encrypt_session ? 1 : 0);
DBWriteContactSettingByte(0, PROTO, "IdleAsAway", options.idle_as_away ? 1 : 0);
+
+ DBWriteContactSettingByte(0, PROTO, "UseOldClientVer", options.use_old_default_client_ver ? 1 : 0);
}
diff --git a/sametime/options.h b/sametime/options.h
index 6c6a7bf..b5569c0 100644
--- a/sametime/options.h
+++ b/sametime/options.h
@@ -24,6 +24,7 @@ typedef struct Options_tag {
bool add_contacts;
bool encrypt_session;
bool idle_as_away;
+ bool use_old_default_client_ver;
} Options;
extern Options options;
diff --git a/sametime/resource.h b/sametime/resource.h
index bdc02cc..ab630bd 100644
--- a/sametime/resource.h
+++ b/sametime/resource.h
@@ -1,5 +1,5 @@
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
// Used by resource.rc
//
#define IDD_DIALOG1 101
@@ -27,22 +27,23 @@
#define IDC_RAD_ERRPOP 1013
#define IDC_RAD_ERRBAL 1014
#define IDC_RAD_ANSI 1015
-#define IDC_RAD_UTF8 1016
-#define IDC_CHK_USERCP 1017
-#define IDC_RAD_OEM 1018
-#define IDC_RAD_ENC 1019
-#define IDC_RAD_UTF7 1020
-#define IDC_RAD_NOENC 1021
-#define IDC_RAD_ANSI2 1022
-#define IDC_RAD_USERCP 1023
-#define IDC_ED_ANMSG 1024
-#define IDC_LST_ANTO 1025
-#define IDC_BUT_SELALL 1026
-#define IDC_BUT_SELINV 1027
-#define IDC_ST_CLIENTVER 1028
-#define IDC_ST_SERVERVER 1029
-#define IDC_EDIT1 1029
-#define IDC_ST_LIBVER 1030
+#define IDC_CHK_OLDDEFAULTVER 1016
+#define IDC_RAD_UTF8 1017
+#define IDC_CHK_USERCP 1018
+#define IDC_RAD_OEM 1019
+#define IDC_RAD_ENC 1020
+#define IDC_RAD_UTF7 1021
+#define IDC_RAD_NOENC 1022
+#define IDC_RAD_ANSI2 1023
+#define IDC_RAD_USERCP 1024
+#define IDC_ED_ANMSG 1025
+#define IDC_LST_ANTO 1026
+#define IDC_BUT_SELALL 1027
+#define IDC_BUT_SELINV 1028
+#define IDC_ST_CLIENTVER 1029
+#define IDC_ST_SERVERVER 1030
+#define IDC_EDIT1 1031
+#define IDC_ST_LIBVER 1032
// Next default values for new objects
//
@@ -50,7 +51,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 111
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1031
+#define _APS_NEXT_CONTROL_VALUE 1033
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/sametime/resource.rc b/sametime/resource.rc
index f3290b3..69992e2 100644
--- a/sametime/resource.rc
+++ b/sametime/resource.rc
@@ -1,4 +1,4 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
@@ -26,74 +26,59 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
// Dialog
//
-IDD_OPTNET DIALOG DISCARDABLE 0, 0, 314, 203
-STYLE WS_CHILD
-FONT 8, "MS Sans Serif"
+IDD_OPTNET DIALOGEX 0, 0, 314, 203
+STYLE DS_SETFONT | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
RTEXT "Server name:",IDC_STATIC,14,61,49,8
EDITTEXT IDC_ED_SNAME,70,57,92,14,ES_AUTOHSCROLL
RTEXT "Port:",IDC_STATIC,14,81,49,8
- EDITTEXT IDC_ED_PORT,70,77,36,14,ES_RIGHT | ES_AUTOHSCROLL |
- ES_NUMBER
+ EDITTEXT IDC_ED_PORT,70,77,36,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
CONTROL "Get contacts from server",IDC_CHK_GETSERVERCONTACTS,
- "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,180,
- 15,115,15
+ "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,180,15,115,15
PUSHBUTTON "Upload Contacts",IDC_BTN_UPLOADCONTACTS,180,29,115,15
- PUSHBUTTON "Import from file...",IDC_BTN_IMPORTCONTACTS,180,48,115,
- 15
- COMBOBOX IDC_CMB_CLIENT,10,117,114,107,CBS_DROPDOWNLIST |
- CBS_SORT | WS_VSCROLL | WS_TABSTOP
- EDITTEXT IDC_ED_CLIENTID,126,117,37,12,ES_RIGHT | ES_AUTOHSCROLL |
- ES_NUMBER
+ PUSHBUTTON "Import from file...",IDC_BTN_IMPORTCONTACTS,180,48,115,15
+ COMBOBOX IDC_CMB_CLIENT,10,109,114,107,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_ED_CLIENTID,126,109,37,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
RTEXT "Id:",IDC_STATIC,14,17,49,8
EDITTEXT IDC_ED_NAME,70,13,92,14,ES_AUTOHSCROLL
RTEXT "Password:",IDC_STATIC,14,39,49,8
EDITTEXT IDC_ED_PWORD,70,35,92,14,ES_PASSWORD | ES_AUTOHSCROLL
GROUPBOX "Error Display",IDC_STATIC,7,143,161,53
- CONTROL "Use message boxes",IDC_RAD_ERRMB,"Button",
- BS_AUTORADIOBUTTON | WS_GROUP,20,156,122,10
- CONTROL "Use popups",IDC_RAD_ERRPOP,"Button",BS_AUTORADIOBUTTON,
- 20,169,122,10
- CONTROL "Use system tray baloons",IDC_RAD_ERRBAL,"Button",
- BS_AUTORADIOBUTTON,21,182,122,10
+ CONTROL "Use message boxes",IDC_RAD_ERRMB,"Button",BS_AUTORADIOBUTTON | WS_GROUP,20,156,122,10
+ CONTROL "Use popups",IDC_RAD_ERRPOP,"Button",BS_AUTORADIOBUTTON,20,169,122,10
+ CONTROL "Use system tray baloons",IDC_RAD_ERRBAL,"Button",BS_AUTORADIOBUTTON,21,182,122,10
GROUPBOX "Connection",IDC_STATIC,7,7,161,91
GROUPBOX "Contacts",IDC_STATIC,172,7,135,91
GROUPBOX "Client ID",IDC_STATIC,7,98,161,44
- CONTROL "Auto-add new contacts",IDC_CHK_ADDCONTACTS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,180,67,115,11
+ CONTROL "Auto-add new contacts",IDC_CHK_ADDCONTACTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,67,115,11
GROUPBOX "Encryption",IDC_STATIC,172,98,135,44
- CONTROL "40 or 128 bit",IDC_RAD_ENC,"Button",BS_AUTORADIOBUTTON |
- WS_GROUP,190,113,88,10
- CONTROL "None",IDC_RAD_NOENC,"Button",BS_AUTORADIOBUTTON,190,126,
- 88,10
+ CONTROL "40 or 128 bit",IDC_RAD_ENC,"Button",BS_AUTORADIOBUTTON | WS_GROUP,190,113,88,10
+ CONTROL "None",IDC_RAD_NOENC,"Button",BS_AUTORADIOBUTTON,190,126,88,10
CTEXT "Static",IDC_ST_CLIENTVER,185,165,102,12,SS_SUNKEN
CTEXT "Static",IDC_ST_SERVERVER,185,180,102,12,SS_SUNKEN
- CONTROL "Treat 'idle' as 'away'",IDC_CHK_IDLEAWAY,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,180,81,115,11
+ CONTROL "Treat 'idle' as 'away'",IDC_CHK_IDLEAWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,81,115,11
CTEXT "Meanwhile lib ver: 1.0.2",IDC_ST_LIBVER,185,150,102,12
GROUPBOX "",IDC_STATIC,172,143,135,53
+ CONTROL "Use old client version",IDC_CHK_OLDDEFAULTVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,33,127,115,11
END
-IDD_SESSIONANNOUNCE DIALOG DISCARDABLE 0, 0, 286, 263
-STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
+IDD_SESSIONANNOUNCE DIALOG 0, 0, 286, 263
+STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Send Announcement"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,95,242,50,14
PUSHBUTTON "Cancel",IDCANCEL,150,242,50,14
- EDITTEXT IDC_ED_ANMSG,10,20,264,60,ES_MULTILINE | ES_AUTOVSCROLL |
- ES_WANTRETURN
+ EDITTEXT IDC_ED_ANMSG,10,20,264,60,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN
LTEXT "Message Text:",IDC_STATIC,9,9,142,8
- CONTROL "List1",IDC_LST_ANTO,"SysListView32",LVS_REPORT |
- WS_BORDER | WS_TABSTOP,10,92,197,132
+ CONTROL "List1",IDC_LST_ANTO,"SysListView32",LVS_REPORT | WS_BORDER | WS_TABSTOP,10,92,197,132
PUSHBUTTON "Select All",IDC_BUT_SELALL,214,122,58,36
- PUSHBUTTON "Invert\n Selection",IDC_BUT_SELINV,214,167,58,36,
- BS_MULTILINE
+ PUSHBUTTON "Invert\n Selection",IDC_BUT_SELINV,214,167,58,36,BS_MULTILINE
END
-IDD_USERSEARCH DIALOG DISCARDABLE 0, 0, 155, 86
-STYLE WS_POPUP
+IDD_USERSEARCH DIALOG 0, 0, 155, 86
+STYLE DS_SETFONT | WS_POPUP
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_EDIT1,34,32,103,14,ES_AUTOHSCROLL
@@ -107,7 +92,7 @@ END
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
+GUIDELINES DESIGNINFO
BEGIN
IDD_OPTNET, DIALOG
BEGIN
@@ -142,18 +127,18 @@ END
// TEXTINCLUDE
//
-1 TEXTINCLUDE DISCARDABLE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE DISCARDABLE
+2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
-3 TEXTINCLUDE DISCARDABLE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -169,10 +154,10 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ICON_PROTO ICON DISCARDABLE "online.ico"
-IDI_ICON_LEAVE ICON DISCARDABLE "part.ico"
-IDI_ICON_INVITE ICON DISCARDABLE "invite.ico"
-IDI_ANNOUNCE ICON DISCARDABLE "announce.ico"
+IDI_ICON_PROTO ICON "online.ico"
+IDI_ICON_LEAVE ICON "part.ico"
+IDI_ICON_INVITE ICON "invite.ico"
+IDI_ANNOUNCE ICON "announce.ico"
#endif // English (Australia) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/sametime/sametime.cpp b/sametime/sametime.cpp
index d8933d8..75ed96a 100644
--- a/sametime/sametime.cpp
+++ b/sametime/sametime.cpp
@@ -35,7 +35,7 @@ bool is_idle = false;
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
"Sametime Protocol",
- PLUGIN_MAKE_VERSION(0, 5, 7, 1),
+ PLUGIN_MAKE_VERSION(0, 5, 8, 0),
"Implementation of Instant Messaging for the Lotus Sametime protocol.",
"Scott Ellis",
"mail@scottellis.com.au",
diff --git a/sametime/sametime.sln b/sametime/sametime.sln
index 5f0eec7..40d9d77 100644
--- a/sametime/sametime.sln
+++ b/sametime/sametime.sln
@@ -1,6 +1,6 @@

-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sametime", "sametime.vcproj", "{BE22A21F-73B7-453F-86A0-B867F0056490}"
EndProject
Global
diff --git a/sametime/sametime.vcproj b/sametime/sametime.vcproj
index f5f4c5d..164d37a 100644
--- a/sametime/sametime.vcproj
+++ b/sametime/sametime.vcproj
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8.00"
+ Version="9.00"
Name="sametime"
ProjectGUID="{BE22A21F-73B7-453F-86A0-B867F0056490}"
RootNamespace="sametime"
+ TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@@ -51,7 +52,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="&quot;..\meanwhile\meanwhile-1.0.2\src&quot;;..\..\..\include"
+ AdditionalIncludeDirectories="&quot;..\meanwhile\meanwhile-1.0.2\src&quot;;..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMETIME_EXPORTS;UNICODE;_UNICODE"
StringPooling="true"
RuntimeLibrary="0"
@@ -84,6 +85,8 @@
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Release/sametime.pdb"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
ImportLibrary=".\Release/sametime.lib"
TargetMachine="1"
/>
@@ -108,9 +111,6 @@
Name="VCAppVerifierTool"
/>
<Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -150,7 +150,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="&quot;..\meanwhile\meanwhile-1.0.2\src&quot;;..\..\..\include"
+ AdditionalIncludeDirectories="&quot;..\meanwhile\meanwhile-1.0.2\src&quot;;..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMETIME_EXPORTS;UNICODE;_UNICODE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -185,6 +185,8 @@
ModuleDefinitionFile="../meanwhile/Debug/meanwhile.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/sametime.pdb"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
ImportLibrary=".\Debug/sametime.lib"
TargetMachine="1"
/>
@@ -209,9 +211,6 @@
Name="VCAppVerifierTool"
/>
<Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
diff --git a/sametime/session.cpp b/sametime/session.cpp
index 99ef6be..1f09da1 100644
--- a/sametime/session.cpp
+++ b/sametime/session.cpp
@@ -365,15 +365,20 @@ unsigned long __stdcall SessionThread(LPVOID param) {
EnterCriticalSection(&session_cs);
session = mwSession_new(&handler);
- mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, (gpointer)(int)(DBGetContactSettingWord(0, PROTO, "ClientVersionMajor", MW_PROTOCOL_VERSION_MAJOR)), 0);
- mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, (gpointer)(int)(DBGetContactSettingWord(0, PROTO, "ClientVersionMinor", MW_PROTOCOL_VERSION_MINOR)), 0);
-
InitMeanwhileServices();
mwSession_setProperty(session, mwSession_AUTH_USER_ID, options.id, NULL);
mwSession_setProperty(session, mwSession_AUTH_PASSWORD, options.pword, NULL);
mwSession_setProperty(session, mwSession_CLIENT_TYPE_ID, (void *)options.client_id, NULL);
+ if(options.use_old_default_client_ver) {
+ mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMajor", MW_PROTOCOL_VERSION_MAJOR)), 0);
+ mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMinor", MW_PROTOCOL_VERSION_MINOR)), 0);
+ } else {
+ mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMajor", 0x001e)), 0);
+ mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMinor", 0x196f)), 0);
+ }
+
mwSession_start(session);
LeaveCriticalSection(&session_cs);