From e7b69721b0d390cec3f81f97134a51bfef228cf8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 20:01:30 +0300 Subject: PFLAG_UNIQUEIDSETTING removed, its functionality transferred to Proto_SetUniqueId / Proto_GetUniqueId --- include/delphi/m_protocols.inc | 31 +++++++++++++++---------------- include/delphi/m_protosvc.inc | 1 - 2 files changed, 15 insertions(+), 17 deletions(-) (limited to 'include/delphi') diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc index e5af3b4189..83deebaf44 100644 --- a/include/delphi/m_protocols.inc +++ b/include/delphi/m_protocols.inc @@ -186,8 +186,7 @@ const NULL if it isn't. } -function Proto_IsProtocolLoaded(protoName:PAnsiCHar) : PPROTOCOLDESCRIPTOR; stdcall; - external AppDLL name 'Proto_IsProtocolLoaded'; +function Proto_IsProtocolLoaded(protoName:PAnsiCHar) : PPROTOCOLDESCRIPTOR; stdcall; external AppDLL; { gets the network-level protocol associated with a contact Returns a AnsiChar* pointing to the asciiz name of the protocol or NULL if the @@ -195,8 +194,7 @@ function Proto_IsProtocolLoaded(protoName:PAnsiCHar) : PPROTOCOLDESCRIPTOR; stdc This is the name of the module that actually accesses the network for that contact. } -function Proto_GetProtoName(hContact:TMCONTACT) : PAnsiChar; stdcall; - external AppDLL name 'GetContactProto'; +function Proto_GetProtoName(hContact:TMCONTACT) : PAnsiChar; stdcall; external AppDLL name 'GetContactProto'; { determines whether the specified contact has the given protocol in its chain wParam=(WPARAM)(HANDLE)hContact @@ -260,11 +258,9 @@ type tagACCOUNT = TPROTOACCOUNT; //account enumeration service -procedure Proto_EnumAccounts(var nAccs:int; var pAccs:PPPROTOACCOUNT); stdcall; - external AppDLL name 'Proto_EnumAccounts'; +procedure Proto_EnumAccounts(var nAccs:int; var pAccs:PPPROTOACCOUNT); stdcall; external AppDLL; -procedure Proto_EnumProtocols(var nProtos:int; var pProtos:PPPROTOCOLDESCRIPTOR); stdcall; - external AppDLL name 'Proto_EnumProtocols'; +procedure Proto_EnumProtocols(var nProtos:int; var pProtos:PPPROTOCOLDESCRIPTOR); stdcall; external AppDLL; type PACC_CREATE = ^TACC_CREATE; @@ -286,8 +282,7 @@ const //lParam=(LPARAM)(AnsiChar*)szAccountName //return value = PROTOACCOUNT* or NULL -function Proto_GetAccount(proto:PAnsiChar) : PPROTOACCOUNT; stdcall; - external AppDLL name 'Proto_GetAccount'; +function Proto_GetAccount(proto:PAnsiChar) : PPROTOACCOUNT; stdcall; external AppDLL; (* __inline PROTOACCOUNT* ProtoGetAccount( const AnsiChar* accName ) @@ -321,8 +316,7 @@ const Returns 1 if an account is valid and enabled, 0 otherwise } -function Proto_IsAccountEnabled(proto:PPROTOACCOUNT) : byte; stdcall; - external AppDLL name 'Proto_IsAccountEnabled'; +function Proto_IsAccountEnabled(proto:PPROTOACCOUNT) : byte; stdcall; external AppDLL; { determines if an account is locked or not @@ -331,8 +325,7 @@ function Proto_IsAccountEnabled(proto:PPROTOACCOUNT) : byte; stdcall; Returns 1 if an account is locked and not supposed to change status, 0 otherwise } -function Proto_IsAccountLocked(proto:PPROTOACCOUNT) : byte; stdcall; - external AppDLL name 'Proto_IsAccountLocked'; +function Proto_IsAccountLocked(proto:PPROTOACCOUNT) : byte; stdcall; external AppDLL; { gets the account associated with a contact @@ -341,8 +334,14 @@ function Proto_IsAccountLocked(proto:PPROTOACCOUNT) : byte; stdcall; This is the name of the module that actually accesses the network for that contact. } -function Proto_GetBaseAccountName(hContact:TMCONTACT) : PAnsiChar; stdcall; - external AppDLL name 'Proto_GetBaseAccountName'; +function Proto_GetBaseAccountName(hContact:TMCONTACT) : PAnsiChar; stdcall; external AppDLL; + +{ + gets and sets unique id name of any contact +} + +function Proto_GetUniqueId(proto:PAnsiChar) : PAnsiChar; stdcall; external AppDLL; +procedure Proto_SetUniqueId(proto, id:PAnsiChar); stdcall; external AppDLL; // -------------- avatar support --------------------- { diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc index 73bc565a72..1e6296d3b3 100644 --- a/include/delphi/m_protosvc.inc +++ b/include/delphi/m_protosvc.inc @@ -133,7 +133,6 @@ const PFLAG_UNIQUEIDTEXT = 100; // returns a static buffer of text describing the unique field by which this protocol identifies users (already translated), or NULL PFLAG_MAXCONTACTSPERPACKET = 200; // v0.1.2.2+: returns the maximum number of contacts which can be sent in a single PSS_CONTACTS. lParam=(LPARAM)hContact. - PFLAG_UNIQUEIDSETTING = 300; // v0.3+: returns the DB setting name (e.g. szProto=ICQ, szSetting=UIN) that has the ID which makes this user unique on that system (0.3a ONLY), the string is statically allocated so no need to free() PFLAG_MAXLENOFMESSAGE = 400; // v0.3.2+: return the maximum length of an instant message, lParam=(LPARAM)hContact { A protocol might not support this cap, it allows a protocol to say that PFLAGNUM_2 is for -- cgit v1.2.3