diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-09 21:50:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-09 21:50:49 +0000 |
commit | 0173277372e2962b8f5703a0ebad7892dda15e6c (patch) | |
tree | d1ff4bbecbc00f8d77b9a71c71579de53246303c /include | |
parent | 61dfdec9a37cc06a6ee624aaaf03df41f821c1c6 (diff) |
end of the old MC API
git-svn-id: http://svn.miranda-ng.org/main/trunk@8534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_metacontacts.inc | 78 | ||||
-rw-r--r-- | include/m_metacontacts.h | 58 |
2 files changed, 51 insertions, 85 deletions
diff --git a/include/delphi/m_metacontacts.inc b/include/delphi/m_metacontacts.inc index 4a82b0f129..6807a366f9 100644 --- a/include/delphi/m_metacontacts.inc +++ b/include/delphi/m_metacontacts.inc @@ -1,19 +1,19 @@ {
- Miranda IM: the free IM client for Microsoft Windows
-
+ 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.
@@ -26,48 +26,12 @@ const META_PROTO = 'MetaContacts';
const
- { gets the handle for the default contact
- wParam=(HANDLE)hMetaContact
- lParam=0
- returns a handle to the default contact, or null on failure }
- 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 }
- 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 }
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 }
- 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 }
- 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 }
- MS_MC_SETDEFAULTCONTACTNUM = 'MetaContacts/SetDefault';
-
- { sets the default contact, using the subcontact's handle
- wParam=(HANDLE)hMetaContact
- lParam=(HANDLE)hSubcontact
- returns 0 on success }
- 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
@@ -146,19 +110,39 @@ const /////////////////////////////////////////////////////////////////////////////////////////
// binary interface to MC
-{ returns true if a contact is a metacontact or false otherwise
-}
+{ returns true if a contact is a metacontact or false otherwise }
function db_mc_isMeta(hContact:TMCONTACT):int; stdcall;
external CoreDLL name 'db_mc_isMeta';
-{ returns true if a contact is a subcontact or false otherwise
-}
+{ returns true if a contact is a subcontact or false otherwise }
function db_mc_isSub(hContact:TMCONTACT):int; stdcall;
external CoreDLL name 'db_mc_isSub';
-{ returns a meta contact for a subcontact or 0 otherwise
-}
+{ gets the handle for the default contact or 0 on error }
+function db_mc_getDefault(hContact:TMCONTACT):TMCONTACT; stdcall;
+ external CoreDLL name 'db_mc_getDefault';
+
+{ gets the contact number for the default contact or -1 on error }
+function db_mc_getDefaultNum(hContact:TMCONTACT):int; stdcall;
+ external CoreDLL name 'db_mc_getDefaultNum';
+
+{ returns a meta contact for a subcontact or 0 otherwise }
function db_mc_getMeta(hContact:TMCONTACT):TMCONTACT; stdcall;
external CoreDLL name 'db_mc_getMeta';
+{ returns a subcontact with the given index or 0 }
+function db_mc_getSub(hContact:TMCONTACT; idx:int):TMCONTACT; stdcall;
+ external CoreDLL name 'db_mc_getSub';
+
+{ gets the number of subcontacts for a metacontact or -1 on error }
+function db_mc_getSubCount(hContact:TMCONTACT):int; stdcall;
+ external CoreDLL name 'db_mc_getSubCount';
+
+{ sets the default contact, using the subcontact's handle }
+function db_mc_setDefault(hContact,hSub:TMCONTACT):int; stdcall;
+ external CoreDLL name 'db_mc_setDefault';
+
+{ sets the default contact, using the subcontact's number }
+function db_mc_setDefaultNum(hContact:TMCONTACT; idx:int):int; stdcall;
+ external CoreDLL name 'db_mc_setDefaultNum';
{$ENDIF}
diff --git a/include/m_metacontacts.h b/include/m_metacontacts.h index 09921af590..8eb7849814 100644 --- a/include/m_metacontacts.h +++ b/include/m_metacontacts.h @@ -29,48 +29,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // standard module for all mc-related information
#define META_PROTO "MetaContacts"
-//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
@@ -154,14 +118,32 @@ extern "C" #endif
// checks whether a contact is a metacontact
-MIR_CORE_DLL(int) db_mc_isMeta(MCONTACT hContact);
+MIR_CORE_DLL(int) db_mc_isMeta(MCONTACT hMetaContact);
// checks whether a contact is a subcontact of existing MC
-MIR_CORE_DLL(int) db_mc_isSub(MCONTACT hContact);
+MIR_CORE_DLL(int) db_mc_isSub(MCONTACT hSubContact);
+
+//returns a handle to the default contact, or null on failure
+MIR_CORE_DLL(MCONTACT) db_mc_getDefault(MCONTACT hMetaContact);
+
+//returns the default contact number, or -1 on failure
+MIR_CORE_DLL(int) db_mc_getDefaultNum(MCONTACT hMetaContact);
+
+//returns the number of subcontacts, or -1 on failure
+MIR_CORE_DLL(int) db_mc_getSubCount(MCONTACT hMetaContact);
// returns parent hContact for a subcontact or INVALID_CONTACT_ID if it's not a sub
MIR_CORE_DLL(MCONTACT) db_mc_getMeta(MCONTACT hSubContact);
+// returns a subcontact with the given index
+MIR_CORE_DLL(MCONTACT) db_mc_getSub(MCONTACT hMetaContact, int iNum);
+
+//sets the default contact, using the subcontact's handle
+MIR_CORE_DLL(int) db_mc_setDefault(MCONTACT hMetaContact, MCONTACT hSub);
+
+//sets the default contact, using the subcontact's number
+MIR_CORE_DLL(int) db_mc_setDefaultNum(MCONTACT hMetaContact, int iNum);
+
#if defined(__cplusplus)
}
#endif
|