summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2014-01-15 21:04:05 +0000
committerAlexey Kulakov <panda75@bk.ru>2014-01-15 21:04:05 +0000
commit45ed02f2c6064fa41d59c01f457565365d22ae59 (patch)
tree27740fbe37fb0d1b09751491ffa88547de12352e
parentc1173e359c7c5ec3c173a0402716c2a53af607ef (diff)
sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@7669 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/delphi/m_api.pas8
-rw-r--r--include/delphi/m_avatars.inc11
-rw-r--r--include/delphi/m_button.inc26
-rw-r--r--include/delphi/m_button_int.inc11
-rw-r--r--include/delphi/m_chat.inc39
-rw-r--r--include/delphi/m_clist.inc2
-rw-r--r--include/delphi/m_clistint.inc13
-rw-r--r--include/delphi/m_core.inc236
-rw-r--r--include/delphi/m_database.inc5
-rw-r--r--include/delphi/m_db_int.inc1
-rw-r--r--include/delphi/m_findadd.inc2
-rw-r--r--include/delphi/m_help.inc35
-rw-r--r--include/delphi/m_helpers.inc5
-rw-r--r--include/delphi/m_json.inc228
-rw-r--r--include/delphi/m_message.inc29
-rw-r--r--include/delphi/m_netlib.inc13
-rw-r--r--include/delphi/m_popup.inc11
-rw-r--r--include/delphi/m_protoint.inc1
-rw-r--r--include/delphi/m_protomod.inc13
-rw-r--r--include/delphi/m_protosvc.inc41
-rw-r--r--include/delphi/m_skin.inc4
-rw-r--r--include/delphi/m_utils.inc30
22 files changed, 488 insertions, 276 deletions
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas
index 65b045a843..94ff48a9c3 100644
--- a/include/delphi/m_api.pas
+++ b/include/delphi/m_api.pas
@@ -236,19 +236,19 @@ var
{$include m_iconheader.inc}
{$include m_extraicons.inc}
{$include m_errors.inc}
- {$include m_help.inc}
{$include m_proto_listeningto.inc}
{$include m_toptoolbar.inc}
{$include m_msg_buttonsbar.inc}
{$include m_json.inc}
{$include m_xstatus.inc}
{$include m_zlib.inc}
-{$define M_API_UNIT}
- {$include m_helpers.inc}
- {$include m_clistint.inc}
+ {$include m_pluginupdater.inc}
{$include m_metacontacts.inc}
{$include m_timezones.inc}
{$include m_crypto.inc}
+{$define M_API_UNIT}
+ {$include m_helpers.inc}
+ {$include m_clistint.inc}
implementation
diff --git a/include/delphi/m_avatars.inc b/include/delphi/m_avatars.inc
index ae445ac175..d9a7bb7328 100644
--- a/include/delphi/m_avatars.inc
+++ b/include/delphi/m_avatars.inc
@@ -98,17 +98,6 @@ type
szFilename : array[0..MAX_PATH-1] of AnsiChar; // filename of the avatar (absolute path)
end;
- PCacheNode = ^TCacheNode;
- TCacheNode = record
- pNextNode:pCacheNode;
- ace :TavatarCacheEntry;
-// cs :RTL_CRITICAL_SECTION;
- loaded :bool;
- mustLoad :int;
- dwFlags :DWORD;
- pa_format:int;
- end;
-
const
AVDRQ_FALLBACKPROTO = $0001; // use the protocol picture as fallback (currently not used)
AVDRQ_FAILIFNOTCACHED = $0002; // don't create a cache entry if it doesn't already
diff --git a/include/delphi/m_button.inc b/include/delphi/m_button.inc
index dd2c371e66..8ec2ada736 100644
--- a/include/delphi/m_button.inc
+++ b/include/delphi/m_button.inc
@@ -27,7 +27,7 @@ const
{
Sets whether a dropdown arrow is used
wParam = TRUE/FALSE turns arrow on or off
- lParam = not used
+ lParam = 0 (unused)
Usage: SendMessage(hwndbutton,BUTTONSETARROW,1,0);
Only works on MButtonClass buttons
}
@@ -36,7 +36,7 @@ const
{
Sets whether the button is a default button
wParam = TRUE/FALSE default on/off
- lParam = not used
+ lParam = 0 (unused)
Usage: SendMessage(hwndbutton,BUTTONSETDEFAULT,1,0);
Only works on MButtonClass buttons
}
@@ -45,7 +45,7 @@ const
{
Sets the button as a push button
wParam = 1/0 as on/off
- lParam = not used
+ lParam = 0 (unused)
Usage: SendMessage(hwndbutton,BUTTONSETASPUSHBTN,1,0);
Only works on MButtonClass buttons
}
@@ -54,7 +54,7 @@ const
{
Sets the button type as a flat button without borders v0.3.3+
wParam = 1/0 as on/off
- lParam = not used
+ lParam = 0 (unused)
Usage: SendMessage(hwndbutton,BUTTONSETASFLATBTN,1,0);
Only works on MButtonClass buttons
}
@@ -73,7 +73,7 @@ const
{
Sets the button type as a themed button
wParam = TRUE/FALSE default on/off
- lParam = not used
+ lParam = 0 (unused)
Usage: SendMessage(hwndbutton, BUTTONSETASTHEMEDBTN, 1, 0);
Only works on MButtonClass buttons
}
@@ -81,11 +81,19 @@ const
{
Sets the custom painting procedure for a button
- wParam = not used
- lParam = MButtonCustomize* (refer to mbutton_int.h for details)
- Usage: SendMessage(hwndbutton, BUTTONSETCUSTOM, 0, (LPARAM)&CustomData);
+ wParam = new data block length (inherited from MButtonCtrl)
+ lParam = (pfnPainterFunc)pfnPainter (refer to mbutton_int.h for details)
+ Usage: SendMessage(hwndbutton, BUTTONSETCUSTOM, 0, (LPARAM)MyPainter);
Only works on MButtonClass buttons
}
- BUTTONSETCUSTOM = WM_USER + 7;
+ BUTTONSETCUSTOMPAINT = WM_USER + 7;
+
+{
+ Forces a button to send clicks on push
+ wParam = TRUE/FALSE default on/off
+ lParam = 0 (unused)
+ Usage: SendMessage(hwndbutton, BUTTONSETSENDONDOWN, TRUE, 0);
+}
+ BUTTONSETSENDONDOWN = WM_USER + 8;
{$ENDIF}
diff --git a/include/delphi/m_button_int.inc b/include/delphi/m_button_int.inc
index a358d39938..88417cb8f9 100644
--- a/include/delphi/m_button_int.inc
+++ b/include/delphi/m_button_int.inc
@@ -52,20 +52,9 @@ type
bIsThemed, // themed button
bIsSkinned: // skinned button
bool;
- lResult:LRESULT; // custom window proc result
- fnWindowProc:TWNDPROC; // custom window proc
fnPainter:pfnPainterFunc; // custom button painter
pAccPropServices:^IAccPropServices;
end;
-/////////////////////////////////////////////////////////////////
-
-type
- MButtonCustomize = record
- cbLen :size_t; // total length of the internal data structure
- fnWindowProc:TWNDPROC; // subclassed windows procedure for the custom button
- fnPainter :pfnPainterFunc; // custom button painter
- end;
-
{$ENDIF}
diff --git a/include/delphi/m_chat.inc b/include/delphi/m_chat.inc
index 516899c368..f4e080287d 100644
--- a/include/delphi/m_chat.inc
+++ b/include/delphi/m_chat.inc
@@ -126,7 +126,7 @@ const
GC_COLOR = $0008; //enable the 'foreground color' button
GC_BKGCOLOR = $0010; //enable the 'background color' button
GC_ACKMSG = $0020; //the protocol must acknowlege messages sent
- GC_TYPNOTIF = $0040; //NOT SUPPORTED YET! Enable typing notifications.
+ GC_TYPNOTIF = $0040; //enable typing notifications.
GC_CHANMGR = $0080; //enable the 'channel settings' button
GC_SINGLEFORMAT = $0100; //the protocol supports only 1 formatting per message
GC_FONTSIZE = $0200; //enable font size selection
@@ -184,12 +184,12 @@ const
// GCSESSION structure
type
TGCSESSION = record
- cbSize :int; //Set to sizeof(GCSESSION);
- iType :int; //Use one of the GCW_* flags above to set the type of session
+ cbSize :int; //Set to sizeof(GCSESSION);
+ iType :int; //Use one of the GCW_* flags above to set the type of session
pszModule :PAnsiChar; //The name of the protocol owning the session (the same as pszModule when you register)
- szName :TCHAR; //The name of the session as it will be displayed to the user
- szID :TCHAR; //The unique identifier for the session.
- szStatusbarText:TCHAR; //Optional text to set in the statusbar of the chat room window, or NULL.
+ szName :TCHAR; //The name of the session as it will be displayed to the user
+ szID :TCHAR; //The unique identifier for the session.
+ szStatusbarText:TCHAR; //Optional text to set in the statusbar of the chat room window, or NULL.
dwFlags :dword;
dwItemData :int_ptr; //Set user defined data for this session. Retrieve it by using the GC_EVENT_GETITEMDATA event
end;
@@ -396,6 +396,7 @@ const
GC_SSE_ONLYLISTED = $0001; // processes only listed contacts, resets all contacts otherwise
GC_SSE_ONLINE = $0002; // displays a contact online, otherwise away
GC_SSE_TABDELIMITED = $0004; // use tabs as delimiters
+ GC_SSE_OFFLINE = $0008; // displays a contact offline, otherwise away
GC_EVENT_SETSTATUSEX = $1009;
@@ -464,6 +465,8 @@ const
GCEF_ADDTOLOG = $0001;
GCEF_REMOVECONTACT = $0002;
+// Added in Miranda NG 0.94.4+
+ GCEF_NOTNOTIFY = $0004;
// OK! That was about everything that you need to know about for operating Chat in a basic way.
// There are however some more things you will need to know about. Some you may use and some you may not need,
@@ -509,7 +512,7 @@ type
pszModule :PAnsiChar; // the module name as registered in MS_GC_REGISTER
pszID :TCHAR; // unique ID of the session
pszName :TCHAR; // display name of the session
- dwItemData:int_ptr; // user specified data.
+ dwItemData:int_ptr; // user specified data.
iCount :int; // count of users in the nicklist
pszUsers :PAnsiChar; // space separated string containing the UID's of the users in the user list.
// NOTE. Use Mirandas mmi_free() on the returned string.
@@ -537,19 +540,19 @@ const
GC_USER_NICKLISTMENU = 4; // user has selected a userlist menu item, valid members: dwData. See ME_GC_BUILDMENU
GC_USER_TYPNOTIFY = 5; // NOT IMPLEMENTED YET! user is typing
GC_USER_PRIVMESS = 6; // user requests to send a private message to a user. pszUID is valid
+ GC_SESSION_TERMINATE = 7; // the session is about to be terminated, the "user defined data" is passed in dwData, which can be good free'ing any allocated memory.
GC_USER_LEAVE = 8; // user requests to leave the session
GC_USER_CLOSEWND = 9; // user closed the window (this is usually not an indication that the protocol
// should take action, but MSN may want to terminate the session here)
- GC_SESSION_TERMINATE = 7; // the session is about to be terminated, the "user defined data" is passed in dwData, which can be good free'ing any allocated memory.
ME_GC_EVENT:PAnsiChar = 'GChat/OutgoingEvent';
type
TGCHOOK = record
- pDest :PGCDEST; // pointer to a GCDEST structure which specifies from which session the hook was triggered
- szText:TCHAR; // usage depends on type of event
- szUID :TCHAR; // unique identifier, usage depends on type of event
- dwData:int_ptr; // user defined data, usage depends on type of event}
+ pDest :PGCDEST; // pointer to a GCDEST structure which specifies from which session the hook was triggered
+ szText:TCHAR; // usage depends on type of event
+ szUID :TCHAR; // unique identifier, usage depends on type of event
+ dwData:int_ptr; // user defined data, usage depends on type of event}
end;
{
@@ -594,12 +597,12 @@ type
type
TGCMENUITEMS = record
- pszModule:PAnsiChar; // Contains the protocol name, do NOT change.
- pszID :TCHAR; // The unique identifier of the session that triggered the hook, do NOT change.
- pszUID :TCHAR; // Contains the unique identifier if Type = MENU_ON_NICKLIST. do NOT change.
- _Type :int; // Type of menu. MENU_ON_* flags used. do NOT change.
- nItems :int; // Set this to the number of menu items you want to add
- Item :pgc_item; // pointer to the first in the array of gc_item's
+ pszModule:PAnsiChar; // Contains the protocol name, do NOT change.
+ pszID :TCHAR; // The unique identifier of the session that triggered the hook, do NOT change.
+ pszUID :TCHAR; // Contains the unique identifier if Type = MENU_ON_NICKLIST. do NOT change.
+ _Type :int; // Type of menu. MENU_ON_* flags used. do NOT change.
+ nItems :int; // Set this to the number of menu items you want to add
+ Item :pgc_item; // pointer to the first in the array of gc_item's
end;
const
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 86a4a74be5..e8d95269ac 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -268,7 +268,7 @@ const
{
wParam : HCONTACT
- lParam : HANDLE
+ lParam : HDBEVENT
Affect : Remove an event from the contact list queue
Returns: 0 on success, [non zero] on failure
}
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc
index ce93a1ca31..8c6b089879 100644
--- a/include/delphi/m_clistint.inc
+++ b/include/delphi/m_clistint.inc
@@ -255,6 +255,7 @@ const
CLCDEFAULT_FULLGREYOUTFLAGS = MODEF_OFFLINE or PF2_INVISIBLE or GREYF_UNFOCUS;
CLCDEFAULT_QUICKSEARCHCOLOUR = $0000FFFF; //RGB(255,255,0);
CLCDEFAULT_LEFTMARGIN = 0;
+ CLCDEFAULT_RIGHTMARGIN = 2;
CLCDEFAULT_GAMMACORRECT = 1;
CLCDEFAULT_SHOWIDLE = 1;
CLCDEFAULT_USEWINDOWSCOLOURS = 0;
@@ -539,8 +540,16 @@ type
(*************************************************************************************
* version 7 additions (0.11.0.x) - extra images
*************************************************************************************)
- pfnReloadExtraIcons: procedure;
- pfnSetAllExtraIcons: procedure(hwndList:HWND; hContact:THANDLE);
+ pfnReloadExtraIcons: procedure; cdecl;
+ pfnSetAllExtraIcons: procedure(hContact:THANDLE); cdecl;
+
+ (*************************************************************************************
+ * Miranda NG additions
+ *************************************************************************************)
+
+ pfnGetContactIcon: function(hContact:THANDLE):int; cdecl;
+ pfnTrayCalcChanged:function(szChangedProto:pAnsiChar; averageMode:int; iProtoCount:int):int; cdecl;
+ pfnGetAverageMode:function(pNetProtoCount:pint):int; cdecl;
end;
{
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc
index 9a5b054f6d..3ba25248fb 100644
--- a/include/delphi/m_core.inc
+++ b/include/delphi/m_core.inc
@@ -41,6 +41,7 @@ function CmdLine_GetOption(ptszParameter:PWideChar):PWideChar; stdcall;
// database functions
const
+ DBVT_ASIS = 0; // in, for db_get_s, to not translate output value
DBVT_DELETED = 0; // setting got deleted, no values are valid
DBVT_BYTE = 1; // bVal, cVal are valid
DBVT_WORD = 2; // wVal, sVal are valid
@@ -52,6 +53,7 @@ const
DBVTF_VARIABLELENGTH = $80; // ?
type
+ HDBEVENT = THANDLE;
PDBVARIANT = ^TDBVARIANT;
TDBVARIANT = record
_type: Byte;
@@ -73,12 +75,14 @@ type
end;
const
- DBEF_FIRST = 1; // internally only, do not use
- DBEF_SENT = 2; // if set, the event was sent by the user, otherwise it was received
- DBEF_READ = 4; // event has been read by the user -- only needed for history
- DBEF_RTL = 8; // event contains the right-to-left aligned text
- DBEF_UTF = 16; // event contains a text in utf-8
+ DBEF_FIRST = 1; // internally only, do not use
+ DBEF_SENT = 2; // if set, the event was sent by the user, otherwise it was received
+ DBEF_READ = 4; // event has been read by the user -- only needed for history
+ DBEF_RTL = 8; // event contains the right-to-left aligned text
+ DBEF_UTF = 16; // event contains a text in utf-8
+ DBEF_ENCRYPTED = 32; // event is encrypted (never reported outside a driver)
+const
EVENTTYPE_MESSAGE = 0;
EVENTTYPE_URL = 1;
EVENTTYPE_CONTACTS = 2; // v0.1.2.2+
@@ -98,43 +102,169 @@ type
pBlob : PByte; // pointer to buffer containing the module defined event data
end;
+(******************************************************************************
+ * DATABASE EVENTS
+ *)
+
+{
+Adds a new event to a contact's event list
+Returns a handle to the newly added event, or NULL on failure
+Triggers a db/event/added event just before it returns.
+Events are sorted chronologically as they are entered, so you cannot guarantee
+that the new hEvent is the last event in the chain, however if a new event is
+added that has a timestamp less than 90 seconds *before* the event that should
+be after it, it will be added afterwards, to allow for protocols that only
+store times to the nearest minute, and slight delays in transports.
+There are a few predefined eventTypes below for easier compatibility, but
+modules are free to define their own, beginning at 2000
+DBEVENTINFO.timestamp is in GMT, as returned by time(). There are services
+db/time/x below with useful stuff for dealing with it.
+}
function db_event_add(hContact:THANDLE; dbei:PDBEVENTINFO):THANDLE; stdcall;
external CoreDLL name 'db_event_add';
+
+{
+Gets the number of events in the chain belonging to a contact in the database.
+Returns the number of events in the chain owned by hContact or -1 if hContact
+is invalid. They can be retrieved using the db_event_first/last() services.
+}
function db_event_count(hContact:THANDLE):int; stdcall;
external CoreDLL name 'db_event_count';
+
+{
+Removes a single event from the database
+hDbEvent should have been returned by db_event_add/first/last/next/prev()
+Returns 0 on success, or nonzero if hDbEvent was invalid
+Triggers a db/event/deleted event just *before* the event is deleted
+}
function db_event_delete(hContact:THANDLE; hDbEvent:THANDLE):int; stdcall;
external CoreDLL name 'db_event_delete';
+
+{
+Retrieves a handle to the first event in the chain for hContact
+Returns the handle, or NULL if hContact is invalid or has no events
+Events in a chain are sorted chronologically automatically
+}
function db_event_first(hContact:THANDLE):THANDLE; stdcall;
external CoreDLL name 'db_event_first';
+
+{
+Retrieves a handle to the first unread event in the chain for hContact
+Returns the handle, or NULL if hContact is invalid or all its events have been
+read
+
+Events in a chain are sorted chronologically automatically, but this does not
+necessarily mean that all events after the first unread are unread too. They
+should be checked individually with db_event_next() and db_event_get()
+This service is designed for startup, reloading all the events that remained
+unread from last time
+}
function db_event_firstUnread(hContact:THANDLE):THANDLE; stdcall;
external CoreDLL name 'db_event_firstUnread';
+
+{
+Retrieves all the information stored in hDbEvent
+hDbEvent should have been returned by db_event_add/first/last/next/prev()
+Returns 0 on success or nonzero if hDbEvent is invalid
+Don't forget to set dbe.cbSize, dbe.pBlob and dbe.cbBlob before calling this
+service
+The correct value dbe.cbBlob can be got using db/event/getblobsize
+If successful, all the fields of dbe are filled. dbe.cbBlob is set to the
+actual number of bytes retrieved and put in dbe.pBlob
+If dbe.cbBlob is too small, dbe.pBlob is filled up to the size of dbe.cbBlob
+and then dbe.cbBlob is set to the required size of data to go in dbe.pBlob
+On return, dbe.szModule is a pointer to the database module's own internal list
+of modules. Look but don't touch.
+}
function db_event_get(hDbEvent:THANDLE; dbei:PDBEVENTINFO):int; stdcall;
external CoreDLL name 'db_event_get';
+
+{
+Retrieves the space in bytes required to store the blob in hDbEvent
+hDbEvent should have been returned by db_event_add/first/last/next/prev()
+Returns the space required in bytes, or -1 if hDbEvent is invalid
+}
function db_event_getBlobSize(hDbEvent:THANDLE):int; stdcall;
external CoreDLL name 'db_event_getBlobSize';
+
+{
+Retrieves a handle to the contact that owns hDbEvent.
+hDbEvent should have been returned by db_event_add/first/last/next/prev()
+NULL is a valid return value, meaning, as usual, the user.
+Returns (HANDLE)(-1) if hDbEvent is invalid, or the handle to the contact on
+success
+This service is exceptionally slow. Use only when you have no other choice at
+all.
+}
function db_event_getContact(hDbEvent:THANDLE):THANDLE; stdcall;
external CoreDLL name 'db_event_getContact';
+
+{
+Retrieves a handle to the last event in the chain for hContact
+Returns the handle, or NULL if hContact is invalid or has no events
+Events in a chain are sorted chronologically automatically
+}
function db_event_last(hDbEvent:THANDLE):THANDLE; stdcall;
external CoreDLL name 'db_event_last';
+
+{
+Changes the flags for an event to mark it as read.
+hDbEvent should have been returned by db_event_add/first/last/next/prev()
+Returns the entire flag DWORD for the event after the change, or -1 if hDbEvent
+is invalid.
+This is the one database write operation that does not trigger an event.
+Modules should not save flags states for any length of time.
+}
function db_event_markRead(hContact, hDbEvent:THANDLE):int; stdcall;
external CoreDLL name 'db_event_markRead';
+
+{
+Retrieves a handle to the next event in a chain after hDbEvent
+Returns the handle, or NULL if hDbEvent is invalid or is the last event
+Events in a chain are sorted chronologically automatically
+}
function db_event_next(hDbEvent:THANDLE):THANDLE; stdcall;
external CoreDLL name 'db_event_next';
+
+{
+Retrieves a handle to the previous event in a chain before hDbEvent
+Returns the handle, or NULL if hDbEvent is invalid or is the first event
+Events in a chain are sorted chronologically automatically
+}
function db_event_prev(hDbEvent:THANDLE):THANDLE; stdcall;
external CoreDLL name 'db_event_prev';
function db_free(dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_free';
-function db_set_resident(const szModule:pAnsiChar; const szSetting:pAnsiChar; bEnable:int):int; stdcall;
- external CoreDLL name 'db_set_resident';
-function db_unset(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
- external CoreDLL name 'db_unset';
+(******************************************************************************
+ * DATABASE CONTACTS
+ *)
+
+{
+Gets the handle of the first contact in the database. This handle can be used
+with loads of functions. It does not need to be closed.
+You can specify szProto to find only its contacts
+Returns a handle to the first contact in the db on success, or NULL if there
+are no contacts in the db.
+}
function db_find_first(const szModule:pAnsiChar=nil):THANDLE; stdcall;
external CoreDLL name 'db_find_first';
+
+{
+Gets the handle of the next contact after hContact in the database. This handle
+can be used with loads of functions. It does not need to be closed.
+You can specify szProto to find only its contacts
+Returns a handle to the contact after hContact in the db on success or NULL if
+hContact was the last contact in the db or hContact was invalid.
+}
function db_find_next(hContact:THANDLE; const szModule:pAnsiChar=nil):THANDLE; stdcall;
external CoreDLL name 'db_find_next';
+(******************************************************************************
+ * DATABASE SETTINGS
+ *)
+
function db_get(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_get';
function db_get_b(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
@@ -167,6 +297,12 @@ function db_set_utf(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:
function db_set_blob(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
+function db_unset(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
+ external CoreDLL name 'db_unset';
+
+function db_set_resident(const szModule:pAnsiChar; const szSetting:pAnsiChar; bEnable:int):int; stdcall;
+ external CoreDLL name 'db_set_resident';
+
// deprecated Aliases
function DBFreeVariant(dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_free';
@@ -331,10 +467,10 @@ type
tagIconItemW = tIconItemW;
procedure mir_Icon_Register(hInst:HINST; const szSection:pAnsiChar; pIcons:pIconItem;
- iCount:size_t; prefix:PAnsiChar; hLangpack:int); stdcall;
+ iCount:size_t; prefix:PAnsiChar; hLangpack:int=0); stdcall;
external CoreDLL name 'Icon_Register';
procedure mir_Icon_RegisterW(hInst:HINST; const szSection:pWideChar; pIcons:pIconItemW;
- iCount:size_t; prefix:PAnsiChar; hLangpack:int); stdcall;
+ iCount:size_t; prefix:PAnsiChar; hLangpack:int=0); stdcall;
external CoreDLL name 'Icon_RegisterT';
///////////////////////////////////////////////////////////////////////////////
@@ -440,28 +576,23 @@ function mir_writeLogW(hLog:THandle; format:PWideChar):int;cdecl;
// Define the state of the MD5 Algorithm.
type
- pmir_md5_byte_t = ^mir_md5_byte_t;
- pmir_md5_word_t = ^mir_md5_word_t;
- mir_md5_byte_t = byte; // 8-bit byte
- mir_md5_word_t = cardinal; // 32-bit word
-
pmir_md5_state_t = ^mir_md5_state_t;
mir_md5_state_t = record
- count:array [0.. 1] of mir_md5_word_t; // message length in bits, lsw first
- abcd :array [0.. 3] of mir_md5_word_t; // digest buffer
- buf :array [0..63] of mir_md5_byte_t; // accumulate block
+ count:array [0.. 1] of cardinal; // message length in bits, lsw first
+ abcd :array [0.. 3] of cardinal; // digest buffer
+ buf :array [0..63] of byte; // accumulate block
end;
- TMD5Hash = array [0..15] of mir_md5_byte_t;
+ TMD5Hash = array [0..15] of byte;
procedure mir_md5_init(pms:pmir_md5_state_t); stdcall;
- external CoreDLL name 'mir_md5_init';
-procedure mir_md5_append(pms:pmir_md5_state_t; const data:pmir_md5_byte_t; nbytes:int); stdcall;
- external CoreDLL name 'mir_md5_append';
+ external CoreDLL name 'mir_md5_init';
+procedure mir_md5_append(pms:pmir_md5_state_t; const data:pbyte; nbytes:int); stdcall;
+ external CoreDLL name 'mir_md5_append';
procedure mir_md5_finish(pms:pmir_md5_state_t; digest:TMD5Hash); stdcall;
- external CoreDLL name 'mir_md5_finish';
-procedure mir_md5_hash(const data:pmir_md5_byte_t; len:int; digest:TMD5Hash); stdcall;
- external CoreDLL name 'mir_md5_hash';
+ external CoreDLL name 'mir_md5_finish';
+procedure mir_md5_hash(const data:pbyte; len:int; digest:TMD5Hash); stdcall;
+ external CoreDLL name 'mir_md5_hash';
///////////////////////////////////////////////////////////////////////////////
@@ -538,12 +669,27 @@ function mir_vsnwprintf(buffer:pWideChar;count:size_t;fmt:pWideChar;va:va_list):
function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr; stdcall;
external CoreDLL name 'ProtoBroadcastAck';
-function ProtoCallService(const szModule, szName:PAnsiChar; wParam:WPARAM; lParam:LPARAM):int_ptr; stdcall;
+function ProtoServiceExists(const szModule, szName:PAnsiChar):int; stdcall;
external CoreDLL name 'ProtoServiceExists';
-function ProtoServiceExists(const szModule, szName:PAnsiChar):int; stdcall;
+function ProtoCallService(const szModule, szName:PAnsiChar; wParam:WPARAM; lParam:LPARAM):int_ptr; stdcall;
external CoreDLL name 'ProtoServiceExists';
+
+// Call it in the very beginning of your proto's constructor
+procedure ProtoConstructor(pThis:pointer{PPROTO_INTERFACE}; const pszModuleName:PAnsiChar;
+ ptszUserName:PWideChar); stdcall;
+ external CoreDLL name 'ProtoConstructor';
+
+// Call it in the very end of your proto's destructor
+procedure ProtoDestructor(pThis:pointer{PPROTO_INTERFACE}); stdcall;
+ external CoreDLL name 'ProtoDestructor';
+
+procedure ProtoLogA(pThis:pointer{PPROTO_INTERFACE}; szFormat :pAnsiChar; args:va_list); stdcall;
+ external CoreDLL name 'ProtoLogA';
+procedure ProtoLogW(pThis:pointer{PPROTO_INTERFACE}; wszFormat:pWideChar; args:va_list); stdcall;
+ external CoreDLL name 'ProtoLogW';
+
// returns image extension by a PA_* constant or empty string for PA_FORMAT_UNKNOWN
function ProtoGetAvatarExtension(format:int):PWideChar; stdcall;
external CoreDLL name 'ProtoGetAvatarExtension';
@@ -563,11 +709,6 @@ function ProtoGetBufferFormat(const buf:PByte; var ext:PWideChar):int; stdcall;
///////////////////////////////////////////////////////////////////////////////
// sha1 functions
-type
- pmir_sha1_byte_t = ^mir_sha1_byte_t;
- pmir_sha1_long_t = ^mir_sha1_long_t;
- mir_sha1_byte_t = byte;
- mir_sha1_long_t = longword;
const
MIR_SHA1_HASH_SIZE = 20;
@@ -575,32 +716,33 @@ const
type
pmir_sha1_ctx = ^mir_sha1_ctx;
mir_sha1_ctx = record
- H:array [0.. 4] of mir_sha1_long_t;
- W:array [0..79] of mir_sha1_long_t;
+ H:array [0.. 4] of longword;
+ W:array [0..79] of longword;
lenW:int;
- sizeHi,sizeLo:mir_sha1_long_t;
+ sizeHi,sizeLo:longword;
end;
- SHA1Hash = array [0..MIR_SHA1_HASH_SIZE-1] of mir_sha1_byte_t;
+ SHA1Hash = array [0..MIR_SHA1_HASH_SIZE-1] of byte;
procedure mir_sha1_init(ctx:pmir_sha1_ctx); stdcall;
external CoreDLL name 'mir_sha1_init';
-procedure mir_sha1_append(ctx:pmir_sha1_ctx; dataIn:pmir_sha1_byte_t; len:int); stdcall;
+procedure mir_sha1_append(ctx:pmir_sha1_ctx; dataIn:pbyte; len:int); stdcall;
external CoreDLL name 'mir_sha1_append';
procedure mir_sha1_finish(ctx:pmir_sha1_ctx; hashout:SHA1Hash); stdcall;
external CoreDLL name 'mir_sha1_finish';
-procedure mir_sha1_hash(dataIn:pmir_sha1_byte_t; len:int;hashout:SHA1Hash); stdcall;
+procedure mir_sha1_hash(dataIn:pbyte; len:int;hashout:SHA1Hash); stdcall;
external CoreDLL name 'mir_sha1_hash';
-procedure mir_hmac_sha1(hashout:SHA1Hash; const key:pmir_sha1_byte_t; keyLen:size_t; const dataIn:pmir_sha1_byte_t; dataLen:size_t); stdcall;
+procedure mir_hmac_sha1(hashout:SHA1Hash; const key:pbyte; keyLen:size_t;
+ const dataIn:pbyte; dataLen:size_t); stdcall;
external CoreDLL name 'mir_hmac_sha1';
///////////////////////////////////////////////////////////////////////////////
// strings
-function mir_base64_decode(str:pAnsiChar; var resultSize:int):PByte; stdcall;
+function mir_base64_decode(str:pAnsiChar; var resultSize:int):pByte; stdcall;
external CoreDLL name 'mir_base64_decode';
-function mir_base64_encode(data:PByte; dataSize:int):pAnsiChar; stdcall;
+function mir_base64_encode(str:pAnsiChar; dataSize:int):pAnsiChar; stdcall;
external CoreDLL name 'mir_base64_encode';
function mir_base64_encodebuf(data:PByte; dataSize:int; output:pAnsiChar; outputLen:int):pAnsiChar; stdcall;
external CoreDLL name 'mir_base64_encodebuf';
@@ -740,12 +882,15 @@ function mir_callNextSubclass(Wnd:HWND; WndProc:TWNDPROC; uMsg:uint; wParam:WPA
procedure mir_unsubclassWindow(Wnd:HWND; WndProc:TWNDPROC); stdcall;
external CoreDLL name 'mir_unsubclassWindow';
+procedure KillModuleSubclassing(hInst: HMODULE);
+ external CoreDLL name 'KillModuleSubclassing';
+
///////////////////////////////////////////////////////////////////////////////
// Windows utilities
-function IsWinVerVistaPlus():int; stdcall;
+function IsWinVerVistaPlus():bool; stdcall;
external CoreDLL name 'IsWinVerVistaPlus';
-function IsWinVer7Plus():int; stdcall;
+function IsWinVer7Plus():bool; stdcall;
external CoreDLL name 'IsWinVer7Plus';
function IsFullScreen():int; stdcall;
external CoreDLL name 'IsFullScreen';
@@ -754,4 +899,7 @@ function IsWorkstationLocked():int; stdcall;
function IsScreenSaverRunning():int; stdcall;
external CoreDLL name 'IsScreenSaverRunning';
+procedure UnloadCoreModule(); stdcall;
+ external CoreDLL name 'UnloadCoreModule';
+
{$ENDIF}
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc
index 97dae60205..ea59b1d674 100644
--- a/include/delphi/m_database.inc
+++ b/include/delphi/m_database.inc
@@ -215,6 +215,11 @@ const
lParam=pointer to TDBEVENTGETTEXT
dbe should be the valid database event read via MS_DB_EVENT_GET
Only events of type EVENTTYPE_MESSAGE are supported.
+
+ egt->dbei should be the valid database event read via db_event_get()
+ egt->datatype = DBVT_WCHAR or DBVT_ASCIIZ or DBVT_TCHAR.
+ egt->codepage is any valid codepage, CP_ACP by default.
+
Function returns a pointer to a string in the required format.
This string should be freed by a call of mir_free
}
diff --git a/include/delphi/m_db_int.inc b/include/delphi/m_db_int.inc
index 6849d5e358..865b5b2c85 100644
--- a/include/delphi/m_db_int.inc
+++ b/include/delphi/m_db_int.inc
@@ -99,6 +99,7 @@ type
EnumContactSettings :function(hContact:THANDLE; dbces:PDBCONTACTENUMSETTINGS):bool; stdcall;
SetSettingResident :function(bIsResident:bool; const pszSettingName:PAnsiChar):bool; stdcall;
EnumResidentSettings:function(pFunc:TDBMODULEENUMPROC; pParam:pointer):bool; stdcall;
+ IsSettingEncrypted :function(szModule:PAnsiChar; szSetting:pAnsiChar):bool; stdcall;
end;
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/delphi/m_findadd.inc b/include/delphi/m_findadd.inc
index 8adde75d80..572623f29a 100644
--- a/include/delphi/m_findadd.inc
+++ b/include/delphi/m_findadd.inc
@@ -31,6 +31,6 @@ const
already open.
Returns: Always returns 0
}
- MS_FINDADDFINDADD:PAnsiChar = 'FindAdd/FindAddCommand';
+ MS_FINDADD_FINDADD:PAnsiChar = 'FindAdd/FindAddCommand';
{$ENDIF}
diff --git a/include/delphi/m_help.inc b/include/delphi/m_help.inc
deleted file mode 100644
index 9f8c684161..0000000000
--- a/include/delphi/m_help.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-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_HELP}
-{$DEFINE M_HELP}
-
-{
- wParam = 0
- lParam = (char *)url;
- Sends the bug report url in lParam. Is usually called from
- the Help/Report Bug menu.
-}
-const
- ME_HELP_BUGREPORT:PAnsiChar = 'Help/ReportBug';
-
-{$ENDIF}
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index f14fab1727..8d59327c2e 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -68,8 +68,8 @@ function Options_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
function Hotkey_Register(hk:PHOTKEYDESC):int_ptr;
function Skin_AddIcon(si:PSKINICONDESC):THANDLE;
-procedure Icon_Register(hInst:HINST; const szSection:pAnsiChar; pIcons:pIconItem ; iCount:size_t; prefix:PAnsiChar=nil);
-procedure Icon_RegisterW(hInst:HINST; const szSection:pWideChar; pIcons:pIconItemW; iCount:size_t; prefix:PAnsiChar=nil);
+procedure Icon_Register (hInst:HINST; const szSection:pAnsiChar; pIcons:pIconItem ; iCount:size_t; prefix:PAnsiChar);
+procedure Icon_RegisterW(hInst:HINST; const szSection:pWideChar; pIcons:pIconItemW; iCount:size_t; prefix:PAnsiChar);
procedure FontRegister(pFontID:pFontID);
procedure FontRegisterW(pFontID:pFontIDW);
@@ -343,6 +343,7 @@ begin
Result := CreateServiceFunction(szStr, @serviceProc);
end;
+// Hidden variable hLangpack - do not use Inline style
function Srmm_AddIcon(sid: PStatusIconData):int_ptr;
begin
result:=CallService(MS_MSG_ADDICON, hLangpack, LPARAM(sid));
diff --git a/include/delphi/m_json.inc b/include/delphi/m_json.inc
index b18b396814..bdb48bac9f 100644
--- a/include/delphi/m_json.inc
+++ b/include/delphi/m_json.inc
@@ -1,90 +1,154 @@
+{
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2008 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+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 MIM_LIBJSON}
{$DEFINE MIM_LIBJSON}
type
- PJSONNODE = ^JSONNODE;
- JSONNODE = pointer;
- TJSONNODE_ITERATOR = pointer; //^^JSONNODE; // typedef JSONNODE** JSONNODE_ITERATOR;
+ PJSONNODE = ^JSONNODE;
+ JSONNODE = pointer;
-// This function get the service interface for direct calling
-// wParam=(WPARAM)(LPJSONSERVICEINTERFACE)
-// lParam=0
-// Return value ALWAYS 0
+procedure json_free(str:pointer); stdcall;
+ external CoreDLL name 'json_free';
+procedure json_delete(node:PJSONNODE); stdcall;
+ external CoreDLL name 'json_delete';
-type
- PJSONSERVICEINTERFACE = ^TJSONSERVICEINTERFACE;
- TJSONSERVICEINTERFACE = record
- free : procedure (str:pointer);cdecl;
- delete_ : procedure (node:PJSONNODE);cdecl;
- free_all : procedure ;cdecl;
- delete_all : procedure ;cdecl;
- parse : function (json:PAnsiChar):PJSONNODE;cdecl;
- strip_white_space : function (json:PAnsiChar):PAnsiChar;cdecl;
- validate : function (json:PAnsiChar):PJSONNODE;cdecl;
-
- new_a : function (name:PAnsiChar; value:PAnsiChar):PJSONNODE;cdecl;
- new_i : function (name:PAnsiChar; value:long):PJSONNODE;cdecl;
- new_f : function (name:PAnsiChar; value:double):PJSONNODE;cdecl;
- new_b : function (name:PAnsiChar; value:int):PJSONNODE;cdecl;
- new_ : function (_type:char):PJSONNODE;cdecl;
-
- copy : function (orig:PJSONNODE):PJSONNODE;cdecl;
- duplicate : function (orig:PJSONNODE):PJSONNODE;cdecl;
-
- set_a : procedure (node:PJSONNODE; value:PAnsiChar);cdecl;
- set_i : procedure (node:PJSONNODE; value:long);cdecl;
- set_f : procedure (node:PJSONNODE; value:double);cdecl;
- set_b : procedure (node:PJSONNODE; value:int);cdecl;
- set_n : procedure (node:PJSONNODE; orig:PJSONNODE);cdecl;
-
- _type : function (node:PJSONNODE):char;cdecl;
- size : function (node:PJSONNODE):uint;cdecl;
- empty : function (node:PJSONNODE):int;cdecl;
- name : function (node:PJSONNODE):PAnsiChar;cdecl;
- get_comment : function (node:PJSONNODE):PAnsiChar;cdecl;
-
- as_string : function (node:PJSONNODE):PAnsiChar;cdecl;
- as_int : function (node:PJSONNODE):long;cdecl;
- as_float : function (node:PJSONNODE):double;cdecl;
- as_bool : function (node:PJSONNODE):int;cdecl;
- as_node : function (node:PJSONNODE):PJSONNODE;cdecl;
- as_array : function (node:PJSONNODE):PJSONNODE;cdecl;
- as_binary : function (node:PJSONNODE; size:Pulong):pointer;cdecl;
-
- write : function (node:PJSONNODE):PAnsiChar;cdecl;
- write_formatted : function (node:PJSONNODE):PAnsiChar;cdecl;
- set_name : procedure (node:PJSONNODE; name:PAnsiChar);cdecl;
- set_comment : procedure (node:PJSONNODE; comment:PAnsiChar);cdecl;
- clear : procedure (node:PJSONNODE);cdecl;
- nullify : procedure (node:PJSONNODE);cdecl;
- swap : procedure (node:PJSONNODE; node2:PJSONNODE);cdecl;
- merge : procedure (node:PJSONNODE; node2:PJSONNODE);cdecl;
- preparse : procedure (node:PJSONNODE);cdecl;
- set_binary : procedure (node:PJSONNODE; data:pointer; length:ulong);cdecl;
- cast : procedure (node:PJSONNODE; _type:AnsiChar);cdecl;
- reserve : procedure (node:PJSONNODE; siz:uint);cdecl;
- at : function (node:PJSONNODE; pos:uint):PJSONNODE;cdecl;
- get : function (node:PJSONNODE; name:PAnsiChar):PJSONNODE;cdecl;
- get_nocase : function (node:PJSONNODE; name:PAnsiChar):PJSONNODE;cdecl;
- pop_back_nocase : function (node:PJSONNODE; name:PAnsiChar):PJSONNODE;cdecl;
- push_back : procedure (node:PJSONNODE; node2:PJSONNODE);cdecl;
- pop_back_at : function (node:PJSONNODE; pos:uint):PJSONNODE;cdecl;
- pop_back : function (node:PJSONNODE; name:PAnsiChar):PJSONNODE;cdecl;
- find : function (node:PJSONNODE; name:PAnsiChar):TJSONNODE_ITERATOR;cdecl;
- find_nocase : function (node:PJSONNODE; name:PAnsiChar):TJSONNODE_ITERATOR;cdecl;
- erase : function (node:PJSONNODE; it:TJSONNODE_ITERATOR):TJSONNODE_ITERATOR;cdecl;
- erase_multi : function (node:PJSONNODE; start:TJSONNODE_ITERATOR;
- _end:TJSONNODE_ITERATOR):TJSONNODE_ITERATOR;cdecl;
- insert : function (node:PJSONNODE; it:TJSONNODE_ITERATOR; node2:PJSONNODE):TJSONNODE_ITERATOR;cdecl;
- insert_multi : function (node:PJSONNODE; it:TJSONNODE_ITERATOR; start:TJSONNODE_ITERATOR;
- _end:TJSONNODE_ITERATOR):TJSONNODE_ITERATOR;cdecl;
-
- _begin : function (node:PJSONNODE):TJSONNODE_ITERATOR;cdecl;
- _end : function (node:PJSONNODE):TJSONNODE_ITERATOR;cdecl;
- equal : function (node:PJSONNODE; node2:PJSONNODE):int;cdecl;
- end;
-
-const
- MS_JSON_GETINTERFACE:PAnsiChar = 'JSON/GetInterface';
+function json_parse(json:pAnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_parse';
+function json_strip_white_space(json:pAnsiChar):pWideChar; stdcall;
+ external CoreDLL name 'json_strip_white_space';
+
+function json_validate(json:pAnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_validate';
+
+{
+ stuff that's in class JSONNode
+}
+//ctors
+function json_new_a(name:pAnsiChar; value:pAnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_new_a';
+function json_new_i(name:pAnsiChar; value:long):PJSONNODE; stdcall;
+ external CoreDLL name 'json_new_i';
+function json_new_f(name:pAnsiChar; value:double):PJSONNODE; stdcall;
+ external CoreDLL name 'json_new_f';
+function json_new_b(name:pAnsiChar; value:int):PJSONNODE; stdcall;
+ external CoreDLL name 'json_new_b';
+function json_new(typ:AnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_new';
+function json_copy(const orig:PJSONNODE):PJSONNODE; stdcall;
+ external CoreDLL name 'json_copy';
+function json_duplicate(const orig:PJSONNODE):PJSONNODE; stdcall;
+ external CoreDLL name 'json_duplicate';
+
+//assignment
+procedure json_set_a(node:PJSONNODE; value:pAnsiChar); stdcall;
+ external CoreDLL name 'json_set_a';
+procedure json_set_i(node:PJSONNODE; value:long); stdcall;
+ external CoreDLL name 'json_set_i';
+procedure json_set_f(node:PJSONNODE; value:double); stdcall;
+ external CoreDLL name 'json_set_f';
+procedure json_set_b(node:PJSONNODE; value:int); stdcall;
+ external CoreDLL name 'json_set_b';
+procedure json_set_n(node:PJSONNODE; const orig: PJSONNODE); stdcall;
+ external CoreDLL name 'json_set_n';
+
+//inspectors
+function json_type(const node:PJSONNODE):AnsiChar; stdcall;
+ external CoreDLL name 'json_type';
+function json_size(const node:PJSONNODE):size_t; stdcall;
+ external CoreDLL name 'json_size';
+function json_empty(const node:PJSONNODE):int; stdcall;
+ external CoreDLL name 'json_empty';
+function json_name(const node:PJSONNODE):pAnsiChar; stdcall;
+ external CoreDLL name 'json_name';
+
+function json_get_comment(const node:PJSONNODE):pAnsiChar; stdcall;
+ external CoreDLL name 'json_get_comment';
+
+function json_as_string(const node:PJSONNODE):pWideChar; stdcall;
+ external CoreDLL name 'json_as_string';
+function json_as_int(const node:PJSONNODE):long; stdcall;
+ external CoreDLL name 'json_as_int';
+function json_as_float(const node:PJSONNODE):double; stdcall;
+ external CoreDLL name 'json_as_float';
+function json_as_bool(const node:PJSONNODE):int; stdcall;
+ external CoreDLL name 'json_as_bool';
+function json_as_node(const node:PJSONNODE):PJSONNODE; stdcall;
+ external CoreDLL name 'json_as_node';
+function json_as_array(const node:PJSONNODE):PJSONNODE; stdcall;
+ external CoreDLL name 'json_as_array';
+
+function json_write(const node:PJSONNODE):pWideChar; stdcall;
+ external CoreDLL name 'json_write';
+function json_write_formatted(const node:PJSONNODE):pWideChar; stdcall;
+ external CoreDLL name 'json_write_formatted';
+
+//modifiers
+procedure json_set_name(node:PJSONNODE; name:pAnsiChar); stdcall;
+ external CoreDLL name 'json_set_name';
+
+procedure json_set_comment(node:PJSONNODE; comment:pAnsiChar); stdcall;
+ external CoreDLL name 'json_set_comment';
+
+procedure json_clear(node:PJSONNODE); stdcall;
+ external CoreDLL name 'json_clear';
+procedure json_nullify(node:PJSONNODE); stdcall;
+ external CoreDLL name 'json_nullify';
+procedure json_swap(node:PJSONNODE; node2:PJSONNODE); stdcall;
+ external CoreDLL name 'json_swap';
+procedure json_merge(node:PJSONNODE; node2:PJSONNODE); stdcall;
+ external CoreDLL name 'json_merge';
+
+procedure json_preparse(node:PJSONNODE); stdcall;
+ external CoreDLL name 'json_preparse';
+
+procedure json_set_binary(node:PJSONNODE; data:pointer; length:ulong); stdcall;
+ external CoreDLL name 'json_set_binary';
+
+procedure json_cast(node:PJSONNODE; typ:AnsiChar); stdcall;
+ external CoreDLL name 'json_cast';
+
+//children access
+procedure json_reserve(node:PJSONNODE; siz:size_t); stdcall;
+ external CoreDLL name 'json_reserve';
+function json_at(node:PJSONNODE; pos:size_t):PJSONNODE; stdcall;
+ external CoreDLL name 'json_at';
+function json_get(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_get';
+
+function json_get_nocase(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_get_nocase';
+function json_pop_back_nocase(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_pop_back_nocase';
+
+procedure json_push_back(node:PJSONNODE; node2:PJSONNODE); stdcall;
+ external CoreDLL name 'json_push_back';
+function json_pop_back_at(node:PJSONNODE; pos:size_t):PJSONNODE; stdcall;
+ external CoreDLL name 'json_pop_back_at';
+function json_pop_back(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+ external CoreDLL name 'json_pop_back';
+
+//comparsion
+function json_equal(node:PJSONNODE; node2:PJSONNODE):int; stdcall;
+ external CoreDLL name 'json_equal';
{$ENDIF}
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index ceac07dc85..73577802d5 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -126,17 +126,27 @@ const
}
MS_MSG_SETSTATUSTEXT:PAnsiChar = 'MessageAPI/SetStatusText';
+type
+ pMessageWindowEvent = ^MessageWindowEvent;
+ MessageWindowEvent = record
+ cbSize :int;
+ seq :int; // number returned by PSS_MESSAGE
+ hContact :THANDLE;
+ dbei :PDBEVENTINFO; // database event written on the basis of message sent
+ end;
+
+const
{ wparam=0(unused)
- lparam=(pMessageWindowEvent) event being written
+ lparam=(pMessageWindowEvent) event written
fired before SRMM writes an entered message into the database
}
ME_MSG_PRECREATEEVENT:PAnsiChar = 'MessageAPI/PreCreateEvent';
{ wParam = 0
- lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
- Fired to allow plugins to add itens to the msg window popup menu
- Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
- This is done to allow cleaning of resources.
+ lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
+ Fired to allow plugins to add itens to the msg window popup menu
+ Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
+ This is done to allow cleaning of resources.
}
ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
@@ -158,15 +168,6 @@ type
selection:int; // The menu control id or 0 if no one was selected
end;
-type
- pMessageWindowEvent = ^MessageWindowEvent;
- MessageWindowEvent = record
- cbSize :int;
- seq :int; // number returned by PSS_MESSAGE
- hContact :THANDLE;
- dbei :pDbEventInfo; // database event written on the basis of message sent
- end;
-
// status icons
const
MBF_DISABLED = 1;
diff --git a/include/delphi/m_netlib.inc b/include/delphi/m_netlib.inc
index e4b2baf949..81f6464a00 100644
--- a/include/delphi/m_netlib.inc
+++ b/include/delphi/m_netlib.inc
@@ -235,17 +235,6 @@ type
TNetlibNewConnectionProc = procedure(hNewConnection:THandle; dwRemoveIP:DWORD); cdecl;
TNetlibNewConnectionProc_V2 = procedure(hNewConnection:THandle; dwRemoveIP:DWORD; pExtra:pointer); cdecl;
- PNETLIBBINDOLD = ^TNETLIBBINDOLD;
- TNETLIBBINDOLD = record
- cbSize: int;
- pfnNewConnection:TNetlibNewConnectionProc; // function to call when there's
- // a new connection, dwRemoteIP is
- // in host byte order -- the handle
- // is to the new connection
- dwInternalIP: DWORD; // set on return, host byte order
- wPort: WORD; // set on return, host byte order
- end;
-
PNETLIBBIND = ^TNETLIBBIND;
TNETLIBBIND = record
cbSize:int;
@@ -496,7 +485,7 @@ const
lParam=(LPARAM)(SOCKADDR_INET*) numeric IP address structure
Returns 0 on success
}
- MS_NETLIB_STARINGTOADDRESS:PAnsiChar = 'Netlib/StringToAddress';
+ MS_NETLIB_STRINGTOADDRESS:PAnsiChar = 'Netlib/StringToAddress';
{
Converts numerical representation of IP in SOCKADDR_INET into string representation with IP and port
diff --git a/include/delphi/m_popup.inc b/include/delphi/m_popup.inc
index 15a2c66696..77c5d481dd 100644
--- a/include/delphi/m_popup.inc
+++ b/include/delphi/m_popup.inc
@@ -302,6 +302,17 @@ const
MS_POPUP_SHOWMESSAGE :PAnsiChar = 'Popup/ShowMessage';
MS_POPUP_SHOWMESSAGEW:PAnsiChar = 'Popup/ShowMessageW';
+{ Popup/Filter
+Filters Popups out
+
+wParam = (HANDLE)hContact
+lParam = (void*)pWindowProc;
+
+returns: 0 = Popup allowed, 1 = Popup filtered out
+}
+
+ ME_Popup_FILTER:PAnsiChar = 'Popup/Filter';
+
{ Popup/RegisterActions
Registers your action in popup action list
diff --git a/include/delphi/m_protoint.inc b/include/delphi/m_protoint.inc
index cce67deccd..dbb7a3665d 100644
--- a/include/delphi/m_protoint.inc
+++ b/include/delphi/m_protoint.inc
@@ -49,6 +49,7 @@ type
tszUserName :TChar;
szModuleName :PAnsiChar;
hProtoIcon :THandle;
+ hNetlibUser :THandle;
AddToList :function(intf:PPROTO_INTERFACE;flags:int; var psr:TPROTOSEARCHRESULT):THANDLE; cdecl;
AddToListByEvent:function(intf:PPROTO_INTERFACE;flags:int; iContact:int; hDbEvent:THANDLE):THANDLE; cdecl;
diff --git a/include/delphi/m_protomod.inc b/include/delphi/m_protomod.inc
index deb4958358..6a9b3622cd 100644
--- a/include/delphi/m_protomod.inc
+++ b/include/delphi/m_protomod.inc
@@ -100,18 +100,5 @@ const
}
MS_PROTO_BROADCASTACK:PAnsiChar = 'Proto/BroadcastAck';
-// -- Added during 0.3.4 (2004/09/27) development! -----
-{
- wParam: (HANDLE)hContact
- lParam: 0
- Affect: Given a hContact, return the protocol that is registered for it, or NULL if no such protocol exists,
- the returned string does not have to be freed and is valid even for multiple threads.
- Note: Prior to 2004/09/28 this service WAS NOT THREAD SAFE and was slower
- Note: Prior to 2004/09/28 this service would return NULL for a hContact if the protocol module
- associated with the hContact was not currently loaded, no such check is performed now.
- Version: 0.3.4 (2004/09/28)
-}
-const
- MS_PROTODIR_PROTOFROMCONTACT = MS_PROTO_GETCONTACTBASEPROTO;
{$ENDIF}
diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc
index 425e6ce1c2..335e2073ce 100644
--- a/include/delphi/m_protosvc.inc
+++ b/include/delphi/m_protosvc.inc
@@ -179,10 +179,11 @@ const
// for PSR_MESSAGE
- PREF_CREATEREAD = 1; // create the database event with the 'read' flag set
- PREF_UNICODE = 2;
- PREF_RTL = 4; // 0.5+ addition: support for right-to-left messages
- PREF_UTF = 8; // message is in utf-8 (0.7.0+)
+ PREF_CREATEREAD = 1; // create the database event with the 'read' flag set
+ PREF_UNICODE = 2;
+ PREF_RTL = 4; // 0.5+ addition: support for right-to-left messages
+ PREF_UTF = 8; // message is in utf-8 (0.7.0+)
+ PREF_SENT = 16; // message will be created with the DBEF_SENT flag
// for PS_FILERESUME
@@ -223,12 +224,12 @@ type
PPROTORECVEVENT = ^TPROTORECVEVENT;
TPROTORECVEVENT = record
- flags : DWORD;
- timestamp : DWORD;
- szMessage : TChar;
- lParam : LPARAM;
- customInfo: Pointer;
- customSize: DWORD;
+ flags : DWORD;
+ timestamp : DWORD;
+ szMessage : TChar;
+ lParam : LPARAM;
+ pCustomData : pointer;
+ cbCustomDataSize: DWORD;
end;
PPROTORECVFILE = ^TPROTORECVFILE;
@@ -294,8 +295,6 @@ const
Returns: 0 on success, [non zero] on failure
Notes : This service is not available unless PF1_MODEMSGSEND is set,
and PF1_INDIVMODEMSG is *not* set.
- If PF1_INDIVMODEMSG is set, then see PSS_AWAYMSSG for details
- of operations of away messages.
-
Protocol modules smust support lParam=NULL, it may eithere mean
to use an empty message or (preferably) not to reply at all to
@@ -348,7 +347,7 @@ const
PS_GETSTATUS = '/GetStatus';
{
- wParam : HANDLE
+ wParam : HDBEVENT
lParam : 0
Affect : allow 'somebody' to add the user to their contact list, see notes
Returns: 0 on success, [non zero] on failure
@@ -358,13 +357,13 @@ const
protocolSpecific: DWORD;
nick, firstname, lastName, e-mail, requestReason: ASCIIZ;
-
- HANDLE musts be the handle of such an event, one or more
+ HDBEVENT musts be the handle of such an event, one or more
fields may be empty if the protocol doesn't support them
}
PS_AUTHALLOW = '/Authorize';
{
- wParam : HANDLE
+ wParam : HDBEVENT
lParam : TChar - Reason
Affect : Deny an authorisation request
Returns: 0 on success, [non zero] on failure
@@ -502,10 +501,10 @@ const
{
wParam : MAKEWPARAM(flags, iContact)
- lParam : HANDLE
+ lParam : HDBEVENT
Affects: Add a contact to the contact list given an auth/added/contacts events, see notes
Returns: A HCONTACT or NULL(0) on failure
- Notes : HANDLE must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
+ Notes : HDBEVENT must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
flags are the same as PS_ADDTOLIST,
-
iContacts is only used for contacts vents, it is 0-based index
@@ -651,6 +650,14 @@ const
}
PS_GETMYWAYDMAXLENGTH = '/GetMyWAYDMaxLength';
+{
+ Get the unread email message count, optional
+ wParam = (WPARAM)0
+ lParam = (LPARAM)0
+ Returns the number of unread emails
+}
+ PS_GETUNREADEMAILCOUNT = '/GetUnreadEmailCount';
+
// these should be called with CallContactService()
{<</
diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc
index 342a8045ce..291cedd444 100644
--- a/include/delphi/m_skin.inc
+++ b/include/delphi/m_skin.inc
@@ -78,6 +78,10 @@ const
SKINICON_OTHER_INVISIBLE_ALL = 245; // v.0.93.4+
SKINICON_OTHER_FRAME = 246; // v.0.94.1+
+ SKINICON_AUTH_ADD = 247; // v.0.94.4+
+ SKINICON_AUTH_REQUEST = 248; // v.0.94.4+
+ SKINICON_AUTH_GRANT = 249; // v.0.94.4+
+ SKINICON_AUTH_REVOKE = 250; // v.0.94.4+
{
SKINICON_EVENT_MESSAGE_BIG = 300;
SKINICON_EVENT_URL_BIG = 301;
diff --git a/include/delphi/m_utils.inc b/include/delphi/m_utils.inc
index 3556f4e578..3e3e5ecce2 100644
--- a/include/delphi/m_utils.inc
+++ b/include/delphi/m_utils.inc
@@ -393,5 +393,35 @@ const
%mydocuments% -> location of the "My Documents" shell folder.
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// one field form
+
+const
+ ESF_MULTILINE = 1;
+ ESF_COMBO = 2;
+ ESF_RICHEDIT = 3;
+ ESF_PASSWORD = 4;
+
+type
+ PENTER_STRING = ^TENTER_STRING;
+ TENTER_STRING = record
+ cbSize :int; // structure size
+ _type :int; // one of ESF_* constants
+ szModuleName:pAnsiChar; // module name to save window size and combobox strings
+ szDataPrefix:pAnsiChar; // prefix for stored database variables
+ caption :pAnsiChar; // window caption
+ // next TChar fields is on same place
+ // ptszInitVal:TChar; // initial value (note: the core DOES NOT free it)
+ ptszResult :TChar; // result entered (must be freed via mir_free)
+ recentCount :int; // number of combobox strings to store
+ timeout :int; // timeout for the form auto-close
+ end;
+
+const
+// enters one string
+// wParam = 0 (unused)
+// lParam = PENTER_STRING (form description)
+// returns TRUE on pressing OK or FALSE if Cancel was pressed
+ MS_UTILS_ENTERSTRING:pAnsiChar = 'Utils/EnterString';
{$ENDIF}