summaryrefslogtreecommitdiff
path: root/include/delphi/m_protomod.inc
diff options
context:
space:
mode:
Diffstat (limited to 'include/delphi/m_protomod.inc')
-rw-r--r--include/delphi/m_protomod.inc168
1 files changed, 90 insertions, 78 deletions
diff --git a/include/delphi/m_protomod.inc b/include/delphi/m_protomod.inc
index 3b790d42b7..deb4958358 100644
--- a/include/delphi/m_protomod.inc
+++ b/include/delphi/m_protomod.inc
@@ -1,5 +1,4 @@
-(*
-
+{
Miranda IM: the free IM client for Microsoft* Windows*
Copyright 2000-2003 Miranda ICQ/IM project,
@@ -19,87 +18,100 @@ 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_PROTOMOD}
{$DEFINE M_PROTOMOD}
- {$ifndef M_PROTOCOLS}
- {$include m_protocols.inc}
- {$endif}
+ {$IFNDEF M_PROTOCOLS}
+ {$INCLUDE m_protocols.inc}
+ {$ENDIF}
const
+ {
+ wParam : 0
+ lParam : Pointer to a initalised TPROTOCOLDESCRIPTOR structure
+ Affect : Register a protocol module, see notes
+ Returns: 0 on success, [non zero] on failure
+ Notes : This service MUST be called from your module's Load() function
+ TPROTOCOLDESCRIPTOR.type can be a value other than PROTOTYPE_*
+ which are used to provide a more precise positioning information
+ for the contact protocol lists.
+ -
+ Relative values to the constants can be given, but this MUST NOT
+ be done for PROTOTYPE_PROTOCOL.
+ }
+ MS_PROTO_REGISTERMODULE:PAnsiChar = 'Proto/RegisterModule';
+
+ {
+ wParam : HCONTACT
+ lParam : protocol_name_string
+ Affect : Add the given protocol module to the chain for a contact, see notes
+ Returns: 0 success, [non zero] on failure
+ Notes : The module is added to the correct positioning according to it's
+ registered type.
+ }
+ MS_PROTO_ADDTOCONTACT:PAnsiChar = 'Proto/AddToContact';
+
+ {
+ wParam : HCONTACT
+ lParam : protocol_name_string
+ Affect : Remove the given protocol name from the chain for the given contact
+ Returns: 0 on success, [non zero] on failure
+ }
+ MS_PROTO_REMOVEFROMCONTACT:PAnsiChar = 'Proto/RemoveFromContact';
+
+ { see m_globaldefs.pas for CreateProtoServiceFunction }
+
+ {
+ wParam : wParam [arg]
+ lParam : lParam [arg]
+ Affect : Call the next service in the chain for the send operation, see notes
+ Return : Return value should be returned by CallService(MS_PROTO_CHAINSEND,wParam,lParam)
+ Notes : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
+ and can be modified or copid if needed.
+ wParam and lParam should be the values passed to your service,
+ typically your service should return ASAP.
+ }
+ MS_PROTO_CHAINSEND:PAnsiChar = 'Proto/ChainSend';
+
+ {
+ wParam : wParam [arg]
+ lParam : lParam [arg]
+ Affect : Call the next service in the chain in this receive operation, see notes
+ Return : Return value should be returned by CallService(MS_PROTO_CHAINRECV,wParam,lParam)
+ Notes : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
+ and can be modified or copied if needed.
+ wParam and lParam should be the values passed to your service,
+ typically your service should return ASAP.
+ -
+ MS_PROTO_CHAINRECV is thread safe since 0.1.2.0 -- calls
+ are translated to the main thread and passed from there.
+ }
+ MS_PROTO_CHAINRECV:PAnsiChar = 'Proto/ChainRecv';
+
+ {
+ wParam : 0
+ lParam : Pointer to an initalised ACKDATA
+ Affect : Broadcast a ME_PROTO_ACK event, see notes
+ Returns: The return value of the NotifyEventHooks() call
+ Notes : ME_PROTO_ACK is completely thread safe since 01.2.0
+ see notes in core/modules.h under NotifyEventHooks()
+ }
+ 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;
- {
- wParam : 0
- lParam : Pointer to a initalised TPROTOCOLDESCRIPTOR structure
- Affect : Register a protocol module, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : This service MUST be called from your module's Load() function
- TPROTOCOLDESCRIPTOR.type can be a value other than PROTOTYPE_*
- which are used to provide a more precise positioning information
- for the contact protocol lists.
- -
- Relative values to the constants can be given, but this MUST NOT
- be done for PROTOTYPE_PROTOCOL.
- }
- MS_PROTO_REGISTERMODULE = 'Proto/RegisterModule';
-
- {
- wParam : HCONTACT
- lParam : protocol_name_string
- Affect : Add the given protocol module to the chain for a contact, see notes
- Returns: 0 success, [non zero] on failure
- Notes : The module is added to the correct positioning according to it's
- registered type.
- }
- MS_PROTO_ADDTOCONTACT = 'Proto/AddToContact';
-
- {
- wParam : HCONTACT
- lParam : protocol_name_string
- Affect : Remove the given protocol name from the chain for the given contact
- Returns: 0 on success, [non zero] on failure
- }
- MS_PROTO_REMOVEFROMCONTACT = 'Proto/RemoveFromContact';
-
- { see m_globaldefs.pas for CreateProtoServiceFunction }
-
- {
- wParam : wParam [arg]
- lParam : lParam [arg]
- Affect : Call the next service in the chain for the send operation, see notes
- Return : Return value should be returned by CallService(MS_PROTO_CHAINSEND,wParam,lParam)
- Notes : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
- and can be modified or copid if needed.
- wParam and lParam should be the values passed to your service,
- typically your service should return ASAP.
- }
- MS_PROTO_CHAINSEND = 'Proto/ChainSend';
-
- {
- wParam : wParam [arg]
- lParam : lParam [arg]
- Affect : Call the next service in the chain in this receive operation, see notes
- Return : Return value should be returned by CallService(MS_PROTO_CHAINRECV,wParam,lParam)
- Notes : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
- and can be modified or copied if needed.
- wParam and lParam should be the values passed to your service,
- typically your service should return ASAP.
- -
- MS_PROTO_CHAINRECV is thread safe since 0.1.2.0 -- calls
- are translated to the main thread and passed from there.
- }
- MS_PROTO_CHAINRECV = 'Proto/ChainRecv';
-
- {
- wParam : 0
- lParam : Pointer to an initalised ACKDATA
- Affect : Broadcast a ME_PROTO_ACK event, see notes
- Returns: The return value of the NotifyEventHooks() call
- Notes : ME_PROTO_ACK is completely thread safe since 01.2.0
- see notes in core/modules.h under NotifyEventHooks()
- }
- MS_PROTO_BROADCASTACK = 'Proto/BroadcastAck';
{$ENDIF}