-------------------------------------------------------------------------------
Copy to "ICQAPIData.pas" :
--8<---------------------------------------------------------------------------
unit ICQAPIData;
interface
{$IFNDEF __ICQAPIDATA_H_}
{$DEFINE __ICQAPIDATA_H_}
uses Windows;
type
PPointer = ^Pointer;
TBSICQAPI_FireWallData = record
m_bEnabled: Byte;
m_bSocksEnabled: Byte;
m_sSocksVersion: SmallInt;
m_szSocksHost: array[0..511] of char;
m_iSocksPort: integer;
m_bSocksAuthenticationMethod: Byte;
end;
PPBSICQAPI_User = ^PBSICQAPI_User;
PBSICQAPI_User = ^TBSICQAPI_User;
TBSICQAPI_User = record
m_iUIN: integer;
m_hFloatWindow: HWND;
m_iIP: integer;
m_szNickname: array[0..19]of char;
m_szFirstName: array[0..19]of char;
m_szLastName: array[0..19]of char;
m_szEmail: array[0..99]of char;
m_szCity: array[0..99]of char;
m_szState: array[0..99]of char;
m_iCountry: integer;
m_szCountryName: array[0..99]of char;
m_szHomePage: array[0..99]of char;
m_iAge: integer;
m_szPhone: array[0..19]of char;
m_bGender: Byte;
m_iHomeZip: integer;
// Version 1.0001
m_iStateFlags: integer;
end;
PBSICQAPI_Group = ^TBSICQAPI_Group;
TBSICQAPI_Group = record
m_szName: array[0..49]of char;
m_iUserCount: integer;
m_ppUsers: PPBSICQAPI_User;
end;
procedure ICQAPIUtil_FreeUser(pUser: PBSICQAPI_User); stdcall;
procedure ICQAPIUtil_FreeUsers(iCount: integer; pUsers: PPBSICQAPI_User); stdcall;
procedure ICQAPIUtil_FreeGroup(pGroup: PBSICQAPI_Group); stdcall;
const
ICQMsgAPI = 'ICQMAPI.dll';
implementation
procedure ICQAPIUtil_FreeUser(pUser: PBSICQAPI_User);
external ICQMsgAPI name 'ICQAPIUtil_FreeUser';
procedure ICQAPIUtil_FreeUsers(iCount: integer; pUsers: PPBSICQAPI_User);
external ICQMsgAPI name 'ICQAPIUtil_FreeUsers';
procedure ICQAPIUtil_FreeGroup(pGroup: PBSICQAPI_Group);
external ICQMsgAPI name 'ICQAPIUtil_FreeGroup';
{$ENDIF} // __ICQAPIDATA_H_
end.
--8<---------------------------------------------------------------------------
-------------------------------------------------------------------------------
Copy to "ICQAPICalls.pas" :
--8<---------------------------------------------------------------------------
unit ICQAPICalls;
interface
{$IFNDEF __ICQAPICALLS_H_}
{$DEFINE __ICQAPICALLS_H_}
uses Windows, ICQAPIData;
const
BICQAPI_USER_STATE_ONLINE = 0;
BICQAPI_USER_STATE_CHAT = 1;
BICQAPI_USER_STATE_AWAY = 2;
BICQAPI_USER_STATE_OUT = 3;
BICQAPI_USER_STATE_OCCUPIED = 4;
BICQAPI_USER_STATE_DND = 5;
BICQAPI_USER_STATE_INVISIBLE = 6;
BICQAPI_USER_STATE_OFFLINE = 7;
function ICQAPICall_SetLicenseKey(pszName: PChar; pszPassword: PChar; pszLicense: PChar): BOOL; stdcall;
function ICQAPICall_GetVersion(var iVersion: integer): BOOL; stdcall;
function ICQAPICall_GetDockingState(var iDockingState: integer): BOOL; stdcall;
function ICQAPICall_GetFirewallSettings(var oFireWallData: TBSICQAPI_FireWallData): BOOL; stdcall;
function ICQAPICall_GetFullOwnerData(var ppUser: PBSICQAPI_User; iVersion: integer): BOOL; stdcall;
function ICQAPICall_GetFullUserData(var pUser: TBSICQAPI_User; iVersion: integer): BOOL; stdcall;
function ICQAPICall_GetOnlineListDetails(var iCount: integer; ppUsers: PPBSICQAPI_User): BOOL; stdcall;
function ICQAPICall_GetOnlineListHandle(var hWindow: HWND): BOOL; stdcall;
function ICQAPICall_GetOnlineListPlacement(var iIsShowOnlineList: integer): BOOL; stdcall;
function ICQAPICall_GetWindowHandle(var hWindow: HWND): BOOL; stdcall;
function ICQAPICall_RegisterNotify(iVersion: integer; iCount: integer; piEvents: PByte): BOOL; stdcall;
function ICQAPICall_UnRegisterNotify: BOOL; stdcall;
function ICQAPICall_SendFile(iPIN: integer; pszFileNames: PChar): BOOL; stdcall;
// Version 1.0001
function ICQAPICall_GetOnlineListType(var iListType: integer): BOOL; stdcall;
function ICQAPICall_GetGroupOnlineListDetails(var iGroupCount: integer; var ppGroups: PBSICQAPI_Group): BOOL; stdcall;
function ICQAPICall_SetOwnerState(iState: integer): BOOL; stdcall;
function ICQAPICall_SetOwnerPhoneState(iPhoneState: integer): BOOL; stdcall;
function ICQAPICall_SendMessage(iUIN: integer; pszMessage: PChar): BOOL; stdcall;
function ICQAPICall_SendURL(iUIN: integer; pszMessage: PChar): BOOL; stdcall;
function ICQAPICall_SendExternal(iUIN: integer; pszExternal: PChar; pszMessage: PChar; bAutoSend: Byte): BOOL; stdcall;
function ICQAPICall_Generic(iCode: integer; pInBuffer: Pointer; iInSize: integer; ppOutBuffer: PPointer; var iOutSize: integer): BOOL; stdcall;
const
ICQMsgAPI = 'ICQMAPI.dll';
implementation
function ICQAPICall_SetLicenseKey(pszName: PChar; pszPassword: PChar; pszLicense: PChar): BOOL;
external ICQMsgAPI name 'ICQAPICall_SetLicenseKey';
function ICQAPICall_GetVersion(var iVersion: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetVersion';
function ICQAPICall_GetDockingState(var iDockingState: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetDockingState';
function ICQAPICall_GetFirewallSettings(var oFireWallData: TBSICQAPI_FireWallData): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetFirewallSettings';
function ICQAPICall_GetFullOwnerData(var ppUser: PBSICQAPI_User; iVersion: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetFullOwnerData';
function ICQAPICall_GetFullUserData(var pUser: TBSICQAPI_User; iVersion: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetFullUserData';
function ICQAPICall_GetOnlineListDetails(var iCount: integer; ppUsers: PPBSICQAPI_User): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetOnlineListDetails';
function ICQAPICall_GetOnlineListHandle(var hWindow: HWND): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetOnlineListHandle';
function ICQAPICall_GetOnlineListPlacement(var iIsShowOnlineList: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetOnlineListPlacement';
function ICQAPICall_GetWindowHandle(var hWindow: HWND): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetWindowHandle';
function ICQAPICall_RegisterNotify(iVersion: integer; iCount: integer; piEvents: PByte): BOOL;
external ICQMsgAPI name 'ICQAPICall_RegisterNotify';
function ICQAPICall_UnRegisterNotify: BOOL;
external ICQMsgAPI name 'ICQAPICall_UnRegisterNotify';
function ICQAPICall_SendFile(iPIN: integer; pszFileNames: PChar): BOOL;
external ICQMsgAPI name 'ICQAPICall_SendFile';
// Version 1.0001
function ICQAPICall_GetOnlineListType(var iListType: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetOnlineListType';
function ICQAPICall_GetGroupOnlineListDetails(var iGroupCount: integer; var ppGroups: PBSICQAPI_Group): BOOL;
external ICQMsgAPI name 'ICQAPICall_GetGroupOnlineListDetails';
function ICQAPICall_SetOwnerState(iState: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_SetOwnerState';
function ICQAPICall_SetOwnerPhoneState(iPhoneState: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_SetOwnerPhoneState';
function ICQAPICall_SendMessage(iUIN: integer; pszMessage: PChar): BOOL;
external ICQMsgAPI name 'ICQAPICall_SendMessage';
function ICQAPICall_SendURL(iUIN: integer; pszMessage: PChar): BOOL;
external ICQMsgAPI name 'ICQAPICall_SendURL';
function ICQAPICall_SendExternal(iUIN: integer; pszExternal: PChar; pszMessage: PChar; bAutoSend: Byte): BOOL;
external ICQMsgAPI name 'ICQAPICall_SendExternal';
function ICQAPICall_Generic(iCode: integer; pInBuffer: Pointer; iInSize: integer; ppOutBuffer: PPointer; var iOutSize: integer): BOOL;
external ICQMsgAPI name 'ICQAPICall_Generic';
{$ENDIF} // __ICQAPICALLS_H_
end.
--8<---------------------------------------------------------------------------
-------------------------------------------------------------------------------
Copy to "ICQAPINotifications.pas" :
--8<---------------------------------------------------------------------------
unit ICQAPINotifications;
interface
{$IFNDEF __ICQAPINOTIFICATIONS_H_}
{$DEFINE __ICQAPINOTIFICATIONS_H_}
uses Windows;
const
ICQAPINOTIFY_ONLINELIST_CHANGE = 0;
ICQAPINOTIFY_ONLINE_FULLUSERDATA_CHANGE = 1;
ICQAPINOTIFY_APPBAR_STATE_CHANGE = 2;
ICQAPINOTIFY_ONLINE_PLACEMENT_CHANGE = 3;
ICQAPINOTIFY_OWNER_CHANGE = 4;
ICQAPINOTIFY_OWNER_FULLUSERDATA_CHANGE = 5;
ICQAPINOTIFY_ONLINELIST_HANDLE_CHANGE = 6;
ICQAPINOTIFY_FILE_RECEIVED = 8;
ICQAPINOTIFY_LAST = 80;
ICQAPINOTIFY_ONLINELISTCHANGE_ONOFF = 1;
ICQAPINOTIFY_ONLINELISTCHANGE_FLOAT = 2;
ICQAPINOTIFY_ONLINELISTCHANGE_POS = 3;
type
TBICQAPINotify_OnlineListChange = procedure(iType: integer);
TBICQAPINotify_OnlineFullUserDataChange = procedure(iUIN: integer);
TBICQAPINotify_AppBarStateChange = procedure(iDockingState: integer);
TBICQAPINotify_OnlinePlacementChange = procedure;
TBICQAPINotify_OwnerChange = procedure(iUIN: integer);
TBICQAPINotify_OwnerFullDataChange = procedure;
TBICQAPINotify_OnlineListHandleChange = procedure(hWindow: HWND);
TBICQAPINotify_FileReceived = procedure(pszFileNames: PChar);
procedure ICQAPIUtil_SetUserNotificationFunc(uNotificationCode: UINT; pUserFunc: Pointer); stdcall;
const
ICQMsgAPI = 'ICQMAPI.dll';
implementation
procedure ICQAPIUtil_SetUserNotificationFunc(uNotificationCode: UINT; pUserFunc: Pointer);
external ICQMsgAPI name 'ICQAPIUtil_SetUserNotificationFunc';
{$ENDIF} // __ICQAPINOTIFICATIONS_H_
end.
--8<---------------------------------------------------------------------------
|