summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNvinside <Nvinside@eced67a3-f377-a0ae-92ae-d6de1850b05a>2011-07-04 23:19:30 +0000
committerNvinside <Nvinside@eced67a3-f377-a0ae-92ae-d6de1850b05a>2011-07-04 23:19:30 +0000
commit730ca7df52f2d5bec80da755eac0f140f6be5929 (patch)
tree30c8ccde244dff67f3b68f9930377c6e584817d3
parent2e492f551d85eca9b6e55a91c9d7c9b6cee958c5 (diff)
- small project cleanup
- typo fix - context-sensitive langpacks support git-svn-id: http://mirotr.googlecode.com/svn/trunk@58 eced67a3-f377-a0ae-92ae-d6de1850b05a
-rw-r--r--MirOTR/MirOTR.vcxproj3
-rw-r--r--MirOTR/MirOTR.vcxproj.filters3
-rw-r--r--MirOTR/dllmain.cpp14
-rw-r--r--MirOTR/language.h2
-rw-r--r--MirOTR/mirotrmenu.cpp10
-rw-r--r--MirOTR/mirotrmenu.h4
-rw-r--r--MirOTR/options.cpp6
-rw-r--r--MirOTR/stdafx.h13
-rw-r--r--MirOTR/striphtml.cpp2
-rw-r--r--MirOTR/targetver.h9
-rw-r--r--MirOTR/utils.cpp204
-rw-r--r--miranda/ExternalAPI/m_folders.h12
-rw-r--r--miranda/include/m_folders.h284
-rw-r--r--miranda/include/m_metacontacts.h166
-rw-r--r--miranda/include/m_msg_buttonsbar.h120
-rw-r--r--miranda/include/m_updater.h146
16 files changed, 141 insertions, 857 deletions
diff --git a/MirOTR/MirOTR.vcxproj b/MirOTR/MirOTR.vcxproj
index 819b1ca..d125e59 100644
--- a/MirOTR/MirOTR.vcxproj
+++ b/MirOTR/MirOTR.vcxproj
@@ -284,9 +284,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
- <ItemGroup>
- <None Include="ReadMe.txt" />
- </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/MirOTR/MirOTR.vcxproj.filters b/MirOTR/MirOTR.vcxproj.filters
index 06c80c8..81a5adf 100644
--- a/MirOTR/MirOTR.vcxproj.filters
+++ b/MirOTR/MirOTR.vcxproj.filters
@@ -122,7 +122,4 @@
<Filter>Ressourcendateien</Filter>
</ResourceCompile>
</ItemGroup>
- <ItemGroup>
- <None Include="ReadMe.txt" />
- </ItemGroup>
</Project> \ No newline at end of file
diff --git a/MirOTR/dllmain.cpp b/MirOTR/dllmain.cpp
index c237d73..156ae3a 100644
--- a/MirOTR/dllmain.cpp
+++ b/MirOTR/dllmain.cpp
@@ -10,6 +10,7 @@ HINSTANCE hInst;
PLUGINLINK *pluginLink;
MM_INTERFACE mmi;
UTF8_INTERFACE utfi;
+int hLangpack;
char* g_metaproto;
@@ -22,14 +23,14 @@ PLUGININFOEX pluginInfo={
AUTHOR_MAIL,
LEGAL_COPYRIGHT_LONG,
HOMEPAGE,
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
- MIID_OTRPLUGIN // ANSI and Unicode have different IDs
+ UNICODE_AWARE, // not transient
+ 0, // doesn't replace anything built-in
+ MIID_OTRPLUGIN // ANSI and Unicode have different IDs
};
BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
@@ -141,8 +142,11 @@ DLLFUNC int Load(PLUGINLINK *link)
{
DEBUGOUT_T("LOAD MIROTR")
pluginLink=link;
+ mir_getLP( &pluginInfo );
mir_getMMI(&mmi);
mir_getUTFI(&utfi);
+ /* for timezones
+ mir_getTMI(&tmi); */
CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(MODULENAME "/TrustLevel"));
diff --git a/MirOTR/language.h b/MirOTR/language.h
index 499661b..8934405 100644
--- a/MirOTR/language.h
+++ b/MirOTR/language.h
@@ -46,7 +46,7 @@
#define LANG_OTR_NOTIFY LPGEN("OTR %s (%s)")
//#define LANG_FINGERPRINT_CAPTION LPGEN("OTR New Fingerprint")
-//#define LANG_FINGERPRINT_ASK_VERIFY LPGEN("OTR encrypted session with '%s'.\n\nFingerprint is UNVERIFIED.\n\n%s\n\nVerify?")
+//#define LANG_FINGERPRINT_ASK_VERIFY LPGEN("OTR encrypted session with '%s'.\n\nFingerprint is UNVERIFIED.\n\n%s\n\nVerify?")
//#define LANG_FINGERPRINT_ASK_NEW LPGEN("A new fingerprint has been recieved from '%s'\n\n%s\n\nDo you trust it?")
#define LANG_FINGERPRINT_VERIFIED LPGEN("OTR encrypted session with '%s' is now using a VERIFIED fingerprint")
#define LANG_FINGERPRINT_NOT_VERIFIED LPGEN("OTR encrypted session with '%s' is now using a NOT VERIFIED fingerprint")
diff --git a/MirOTR/mirotrmenu.cpp b/MirOTR/mirotrmenu.cpp
index 005d8fb..03b7930 100644
--- a/MirOTR/mirotrmenu.cpp
+++ b/MirOTR/mirotrmenu.cpp
@@ -90,10 +90,10 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam,LPARAM)
if ( cmep == NULL ) //this is rootsection...build it
return TRUE;
- HANDLE hContact = (HANDLE)pcpp->wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
- hContact = hSub;
- }
+ HANDLE hContact = (HANDLE)pcpp->wParam, hSub;
+ if(options.bHaveMetaContacts && (hSub = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
+ hContact = hSub;
+ }
TrustLevel level = ( TrustLevel )otr_context_get_trust(otrl_context_find_miranda(otr_user_state, hContact));
@@ -168,7 +168,7 @@ INT_PTR OnAddMenuItemMirOTRMenu (WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK PopupMenuWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
- {
+ {
case WM_MEASUREITEM:
if (CallService(MS_CLIST_MENUMEASUREITEM, wParam, lParam)) return TRUE;
break;
diff --git a/MirOTR/mirotrmenu.h b/MirOTR/mirotrmenu.h
index fa24799..fe070f0 100644
--- a/MirOTR/mirotrmenu.h
+++ b/MirOTR/mirotrmenu.h
@@ -24,7 +24,7 @@
typedef struct {
int cbSize; //size in bytes of this structure
union {
- char* pszName; //[TRANSLATED-BY-CORE] text of the menu item
+ char* pszName; //[TRANSLATED-BY-CORE] text of the menu item
TCHAR* ptszName; //Unicode text of the menu item
};
int position; //approx position on the menu. lower numbers go nearer the top
@@ -32,7 +32,7 @@ typedef struct {
DWORD flags; //set of MOMIF_* flags
union {
HICON hIcon; //icon to put by the item. If this was not loaded from
- //a resource, you can delete it straight after the call
+ //a resource, you can delete it straight after the call
HANDLE icolibItem; //set CMIF_ICONFROMICOLIB to pass this value
};
DWORD hotKey; //keyboard accelerator, same as lParam of WM_HOTKEY,0 for none
diff --git a/MirOTR/options.cpp b/MirOTR/options.cpp
index 1e71f29..86781f1 100644
--- a/MirOTR/options.cpp
+++ b/MirOTR/options.cpp
@@ -6,7 +6,7 @@
#include <commctrl.h>
#include <process.h>
-char g_fingerprint_store_filename[MAX_PATH];
+char g_fingerprint_store_filename[MAX_PATH];
char g_private_key_filename[MAX_PATH];
HANDLE hPATH_MIROTR;
Options options;
@@ -783,7 +783,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w
fp = context->fingerprint_root.next;
while(fp) {
otrl_privkey_hash_to_humanT(hash, fp->fingerprint);
- if (hash) {
+ if (hash) {
lvI.iSubItem = 0;
lvI.lParam = (LPARAM)fp;
lvI.pszText = user;
@@ -794,7 +794,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w
ListView_SetItemText(lv,d, 3, (fp->trust && fp->trust != '\0')? TranslateT(LANG_YES) : TranslateT(LANG_NO));
ListView_SetItemText(lv,d, 4, hash );
}
- fp = fp->next;
+ fp = fp->next;
}
mir_free(proto);
}
diff --git a/MirOTR/stdafx.h b/MirOTR/stdafx.h
index 49f7da1..f4ad6e2 100644
--- a/MirOTR/stdafx.h
+++ b/MirOTR/stdafx.h
@@ -8,6 +8,7 @@
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN // Selten verwendete Teile der Windows-Header nicht einbinden.
+
// Windows-Headerdateien:
#include <windows.h>
#include <string.h>
@@ -23,25 +24,29 @@
#define DEBUGOUT_T(x)
#endif
#define MIRANDA_VER 0x0800
-
+#define MIRANDA_CUSTOM_LP
+
+//include
#include <newpluginapi.h>
#include <m_system.h>
#include <m_langpack.h>
#include <m_utils.h>
#include <m_database.h>
-#include <m_folders.h>
#include <m_clist.h>
#include <m_message.h>
-#include <m_metacontacts.h>
#include <m_protocols.h>
#include <m_protomod.h>
#include <m_protosvc.h>
-#include <m_updater.h>
#include <m_popup.h>
#include <m_contacts.h>
#include <m_utils.h>
#include <m_icolib.h>
+
+//ExternalAPI
+#include <m_folders.h>
+#include <m_updater.h>
#include <m_msg_buttonsbar.h>
+#include <m_metacontacts.h>
#include <gcrypt.h>
extern "C" {
diff --git a/MirOTR/striphtml.cpp b/MirOTR/striphtml.cpp
index 31eceef..c76b0f7 100644
--- a/MirOTR/striphtml.cpp
+++ b/MirOTR/striphtml.cpp
@@ -78,7 +78,7 @@ void endtag_cb (void *cbdata, ekhtml_string_t *tag) {
void data_cb (void *cbdata, ekhtml_string_t *text) {
STRIPHTML_DATA *data = (STRIPHTML_DATA *)cbdata;
if(text->len <= 0)
- return;
+ return;
char* s = (char*) mir_calloc(text->len+1);
decode_html_entities_utf8(s, text->str, text->len);
diff --git a/MirOTR/targetver.h b/MirOTR/targetver.h
index c448111..4b435d6 100644
--- a/MirOTR/targetver.h
+++ b/MirOTR/targetver.h
@@ -7,7 +7,8 @@
// Ändern Sie folgende Definitionen für Plattformen, die älter als die unten angegebenen sind.
// Unter MSDN finden Sie die neuesten Informationen über die entsprechenden Werte für die unterschiedlichen Plattformen.
-#ifndef WINVER // Gibt an, dass Windows 2000 die mindestens erforderliche Plattform ist.
+
+#ifndef WINVER // Gibt an, dass Windows 2000 die mindestens erforderliche Plattform ist.
#define WINVER 0x0500 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von Windows abzuzielen.
#endif
@@ -15,10 +16,6 @@
#define _WIN32_WINNT 0x0500 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von Windows abzuzielen.
#endif
-#ifndef _WIN32_WINDOWS // Gibt an, dass Windows 98 die mindestens erforderliche Plattform ist.
-#define _WIN32_WINDOWS 0x0410 // Ändern Sie den entsprechenden Wert, um auf mindestens Windows Me abzuzielen.
-#endif
-
-#ifndef _WIN32_IE // Gibt an, dass Internet Explorer 7.0 die mindestens erforderliche Plattform ist.
+#ifndef _WIN32_IE // Gibt an, dass Internet Explorer 7.0 die mindestens erforderliche Plattform ist.
#define _WIN32_IE 0x0700 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von IE abzuzielen.
#endif
diff --git a/MirOTR/utils.cpp b/MirOTR/utils.cpp
index 6fe6dde..3d3a505 100644
--- a/MirOTR/utils.cpp
+++ b/MirOTR/utils.cpp
@@ -1,24 +1,24 @@
-#include "stdafx.h"
-#include "utils.h"
-
-CRITICAL_SECTION lib_cs;
-
-void InitUtils() {
- InitializeCriticalSection(&lib_cs);
-}
-void DeinitUtils() {
- DeleteCriticalSection(&lib_cs);
-}
-
+#include "stdafx.h"
+#include "utils.h"
+
+CRITICAL_SECTION lib_cs;
+
+void InitUtils() {
+ InitializeCriticalSection(&lib_cs);
+}
+void DeinitUtils() {
+ DeleteCriticalSection(&lib_cs);
+}
+
void lib_cs_lock() {
EnterCriticalSection(&lib_cs);
}
void lib_cs_unlock() {
LeaveCriticalSection(&lib_cs);
-}
-
-HANDLE find_contact(const char* userid, const char* protocol) {
+}
+
+HANDLE find_contact(const char* userid, const char* protocol) {
HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL )
{
@@ -34,79 +34,79 @@ HANDLE find_contact(const char* userid, const char* protocol) {
hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
}
- return 0;
-}
-
-/* Look up a connection context by hContact from the given
-* OtrlUserState. If add_if_missing is true, allocate and return a new
-* context if one does not currently exist. In that event, call
-* add_app_data(data, context) so that app_data and app_data_free can be
-* filled in by the application, and set *addedp to 1. */
-ConnContext * otrl_context_find_miranda(OtrlUserState us, HANDLE hContact)
-{
- ConnContext ** curp;
- if (!hContact) return NULL;
- for (curp = &(us->context_root); *curp; curp = &((*curp)->next)) {
- if ((*curp)->app_data == hContact ) return *curp;
- }
- return NULL;
-}
-
-/* What level of trust do we have in the privacy of this ConnContext? */
-TrustLevel otr_context_get_trust(ConnContext *context)
-{
- TrustLevel level = TRUST_NOT_PRIVATE;
-
- if (context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED) {
- if (context->active_fingerprint->trust &&
- context->active_fingerprint->trust[0] != '\0') {
- level = TRUST_PRIVATE;
- } else {
- level = TRUST_UNVERIFIED;
- }
- } else if (context && context->msgstate == OTRL_MSGSTATE_FINISHED) {
- level = TRUST_FINISHED;
- }
-
- return level;
-}
-
-/* Set verification of fingerprint */
+ return 0;
+}
+
+/* Look up a connection context by hContact from the given
+* OtrlUserState. If add_if_missing is true, allocate and return a new
+* context if one does not currently exist. In that event, call
+* add_app_data(data, context) so that app_data and app_data_free can be
+* filled in by the application, and set *addedp to 1. */
+ConnContext * otrl_context_find_miranda(OtrlUserState us, HANDLE hContact)
+{
+ ConnContext ** curp;
+ if (!hContact) return NULL;
+ for (curp = &(us->context_root); *curp; curp = &((*curp)->next)) {
+ if ((*curp)->app_data == hContact ) return *curp;
+ }
+ return NULL;
+}
+
+/* What level of trust do we have in the privacy of this ConnContext? */
+TrustLevel otr_context_get_trust(ConnContext *context)
+{
+ TrustLevel level = TRUST_NOT_PRIVATE;
+
+ if (context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED) {
+ if (context->active_fingerprint->trust &&
+ context->active_fingerprint->trust[0] != '\0') {
+ level = TRUST_PRIVATE;
+ } else {
+ level = TRUST_UNVERIFIED;
+ }
+ } else if (context && context->msgstate == OTRL_MSGSTATE_FINISHED) {
+ level = TRUST_FINISHED;
+ }
+
+ return level;
+}
+
+/* Set verification of fingerprint */
void VerifyFingerprint(ConnContext *context, bool verify) {
lib_cs_lock();
otrl_context_set_trust(context->active_fingerprint, (verify)?"verified":NULL);
otrl_privkey_write_fingerprints(otr_user_state, g_fingerprint_store_filename);
lib_cs_unlock();
VerifyFingerprintMessage(context, verify);
-}
-
-void VerifyFingerprintMessage(ConnContext *context, bool verify) {
- TCHAR msg[1024];
+}
+
+void VerifyFingerprintMessage(ConnContext *context, bool verify) {
+ TCHAR msg[1024];
mir_sntprintf(msg, 1024, (verify)?TranslateT(LANG_FINGERPRINT_VERIFIED):TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT((HANDLE)context->app_data));
msg[1023] = '\0';
ShowMessage((HANDLE)context->app_data, msg);
- SetEncryptionStatus(context->app_data, otr_context_get_trust(context));
-}
-
-/* Convert a 20-byte hash value to a 45-byte human-readable value */
-void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20])
-{
- int word, byte;
- TCHAR *p = human;
-
- for(word=0; word<5; ++word) {
- for(byte=0; byte<4; ++byte) {
- _stprintf(p, _T("%02X"), hash[word*4+byte]);
- p += 2;
- }
- *(p++) = ' ';
- }
- /* Change that last ' ' to a '\0' */
- --p;
- *p = '\0';
-}
-
-char* contact_get_id(HANDLE hContact, bool bNameOnError) {
+ SetEncryptionStatus(context->app_data, otr_context_get_trust(context));
+}
+
+/* Convert a 20-byte hash value to a 45-byte human-readable value */
+void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20])
+{
+ int word, byte;
+ TCHAR *p = human;
+
+ for(word=0; word<5; ++word) {
+ for(byte=0; byte<4; ++byte) {
+ _stprintf(p, _T("%02X"), hash[word*4+byte]);
+ p += 2;
+ }
+ *(p++) = ' ';
+ }
+ /* Change that last ' ' to a '\0' */
+ --p;
+ *p = '\0';
+}
+
+char* contact_get_id(HANDLE hContact, bool bNameOnError) {
char* pszUniqueID = NULL;
CONTACTINFO ci;
ZeroMemory(&ci, sizeof(ci));
@@ -131,29 +131,29 @@ char* contact_get_id(HANDLE hContact, bool bNameOnError) {
if (pszUniqueID)
mir_snprintf(pszUniqueID, 15, ("%u"), ci.bVal);
}
- }
- if (!pszUniqueID && bNameOnError) {
- char *name = (char *)CallService( MS_CLIST_GETCONTACTDISPLAYNAME, ( WPARAM )hContact, 0 );
- if (name) pszUniqueID = mir_strdup(name);
- }
- return pszUniqueID;
-}
-
-__inline const TCHAR* contact_get_nameT(HANDLE hContact) {
- return (TCHAR*)CallService( MS_CLIST_GETCONTACTDISPLAYNAME, ( WPARAM )hContact, GCDNF_TCHAR );
-}
-
-__inline const char* contact_get_proto(HANDLE hContact) {
- char *uproto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- return uproto;
-}
-
-__inline const char* contact_get_account(HANDLE hContact) {
- char *uacc = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
- return uacc;
-}
-
-void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const HANDLE hContact) {
+ }
+ if (!pszUniqueID && bNameOnError) {
+ char *name = (char *)CallService( MS_CLIST_GETCONTACTDISPLAYNAME, ( WPARAM )hContact, 0 );
+ if (name) pszUniqueID = mir_strdup(name);
+ }
+ return pszUniqueID;
+}
+
+__inline const TCHAR* contact_get_nameT(HANDLE hContact) {
+ return (TCHAR*)CallService( MS_CLIST_GETCONTACTDISPLAYNAME, ( WPARAM )hContact, GCDNF_TCHAR );
+}
+
+__inline const char* contact_get_proto(HANDLE hContact) {
+ char *uproto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ return uproto;
+}
+
+__inline const char* contact_get_account(HANDLE hContact) {
+ char *uacc = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
+ return uacc;
+}
+
+void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const HANDLE hContact) {
if(CallService(MS_SYSTEM_TERMINATED, 0, 0)) return;
if ( !options.bHavePopups) {
diff --git a/miranda/ExternalAPI/m_folders.h b/miranda/ExternalAPI/m_folders.h
index c771a1d..4f3ae66 100644
--- a/miranda/ExternalAPI/m_folders.h
+++ b/miranda/ExternalAPI/m_folders.h
@@ -79,9 +79,9 @@ typedef struct{
char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
+ const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
+ const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
+ const TCHAR *szFormatT;
};
DWORD flags; //FF_* flags
} FOLDERSDATA;
@@ -124,9 +124,9 @@ typedef struct{
typedef struct{
int cbSize;
union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
+ char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
+ wchar_t **szPathW; //unicode version of string.
+ TCHAR **szPathT;
};
} FOLDERSGETALLOCDATA;
diff --git a/miranda/include/m_folders.h b/miranda/include/m_folders.h
deleted file mode 100644
index 5971cff..0000000
--- a/miranda/include/m_folders.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-#define MIRANDA_USERDATA "%miranda_userdata%"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-#define MIRANDA_USERDATAW L"%miranda_userdata%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H \ No newline at end of file
diff --git a/miranda/include/m_metacontacts.h b/miranda/include/m_metacontacts.h
deleted file mode 100644
index 9f348bd..0000000
--- a/miranda/include/m_metacontacts.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-#ifndef MIID_METACONTACTS
-#define MIID_METACONTACTS {0xc0325019, 0xc1a7, 0x40f5, { 0x83, 0x65, 0x4f, 0x46, 0xbe, 0x21, 0x86, 0x3e}}
-#endif
-
-//get the handle for a contact's parent metacontact
-//wParam=(HANDLE)hSubContact
-//lParam=0
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/miranda/include/m_msg_buttonsbar.h b/miranda/include/m_msg_buttonsbar.h
deleted file mode 100644
index 31735f8..0000000
--- a/miranda/include/m_msg_buttonsbar.h
+++ /dev/null
@@ -1,120 +0,0 @@
-#ifndef M_MSG_BUTTONSBAR_H__
-#define M_MSG_BUTTONSBAR_H__
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-//
-// wParam = 0
-// lParam = (BBButton *) &description
-#define MS_BB_ADDBUTTON "TabSRMM/ButtonsBar/AddButton"
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-//
-// wParam = 0
-// lParam = (BBButton *) &description, only button ID and ModuleName used
-#define MS_BB_REMOVEBUTTON "TabSRMM/ButtonsBar/RemoveButton"
-
-//////////////////////////////////////////////////////////////////////////
-// ModifyButton(global)
-//
-// wParam = 0
-// lParam = (BBButton *) &description
-#define MS_BB_MODIFYBUTTON "TabSRMM/ButtonsBar/ModifyButton"
-
-
-#define BBSF_HIDDEN (1<<0)
-#define BBSF_DISABLED (1<<1)
-#define BBSF_PUSHED (1<<2)
-#define BBSF_RELEASED (1<<3)
-
-//////////////////////////////////////////////////////////////////////////
-// GetButtonState(local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , only ModuleName and ID used
-// Returns BBButton struct with BBSF_ bbbFlags:
-#define MS_BB_GETBUTTONSTATE "TabSRMM/ButtonsBar/GetButtonState"
-
-//////////////////////////////////////////////////////////////////////////
-// SetButtonState (local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , ModuleName, ID,hIcon,Tooltip, and BBSF_ bbbFlags are used
-#define MS_BB_SETBUTTONSTATE "TabSRMM/ButtonsBar/SetButtonState"
-
-
-////////////////////////////////////////////////////////////////
-//Events
-//
-///////////////////////////////////////////////////
-// ToolBar loaded event
-// wParam = 0;
-// lParam = 0;
-// This event will be send after module loaded and after each toolbar reset
-// You should add your buttons on this event
-#define ME_MSG_TOOLBARLOADED "TabSRMM/ButtonsBar/ModuleLoaded"
-
-///////////////////////////////////////////////////
-// ButtonClicked event
-// wParam = (HANDLE)hContact;
-// lParam = (CustomButtonClickData *)&CustomButtonClickData;
-// catch to show a popup menu, etc.
-#define ME_MSG_BUTTONPRESSED "TabSRMM/ButtonsBar/ButtonPressed"
-
-
-//event flags
-#define BBCF_RIGHTBUTTON (1<<0)
-#define BBCF_SHIFTPRESSED (1<<1)
-#define BBCF_CONTROLPRESSED (1<<2)
-#define BBCF_ARROWCLICKED (1<<3)
-
-typedef struct {
- int cbSize;
- POINT pt; // screen coordinates for menus
- char* pszModule; // button owners name
- DWORD dwButtonId; // registered button ID
- HWND hwndFrom; // button parents HWND
- HANDLE hContact; //
- DWORD flags; // BBCF_ flags
- } CustomButtonClickData;
-
-
-//button flags
-#define BBBF_DISABLED (1<<0)
-#define BBBF_HIDDEN (1<<1)
-#define BBBF_ISPUSHBUTTON (1<<2)
-#define BBBF_ISARROWBUTTON (1<<3)
-#define BBBF_ISCHATBUTTON (1<<4)
-#define BBBF_ISIMBUTTON (1<<5)
-#define BBBF_ISLSIDEBUTTON (1<<6)
-#define BBBF_ISRSIDEBUTTON (1<<7)
-#define BBBF_CANBEHIDDEN (1<<8)
-#define BBBF_ISDUMMYBUTTON (1<<9)
-#define BBBF_ANSITOOLTIP (1<<10)
-
-#define BBBF_CREATEBYID (1<<11) //only for tabsrmm internal use
-
-typedef struct _tagBBButton
- {
- int cbSize; // size of structure
-
- DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc...
-
- char* pszModuleName; //module name without spaces and underline symbols (e.g. "tabsrmm")
- union{
- char* pszTooltip; //button's tooltip
- TCHAR* ptszTooltip;
- };
- DWORD dwDefPos; // default order pos of button, counted from window edge (left or right)
- // use value >100, because internal buttons using 10,20,30... 80, etc
- int iButtonWidth; // must be 0
- DWORD bbbFlags; // combine of BBBF_ flags above
- HANDLE hIcon; //Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
- }BBButton;
-
-
-#endif //M_MSG_BUTTONSBAR_H__
diff --git a/miranda/include/m_updater.h b/miranda/include/m_updater.h
deleted file mode 100644
index 371b743..0000000
--- a/miranda/include/m_updater.h
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-
-// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
-// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif