diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-16 11:50:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-16 11:50:15 +0000 |
commit | 5161fd3fe53b85f579cfece81e25b562f1fa56ae (patch) | |
tree | 3ac6979cd3774351cb68431da64ca014f1170e98 /include | |
parent | ce6e5ab03d58151c4eda36d05a8436d337b2d3c0 (diff) |
- event code standardization for protocols
- fix for EVENTTYPE_AUTHREQUEST processing
- protocols' custom CallService core removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@1576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/m_protosvc.h | 75 |
1 files changed, 48 insertions, 27 deletions
diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 1c6d04bb39..304c52b188 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -732,10 +732,58 @@ typedef struct { #define PREF_TCHAR 0
#endif
+/* Proto/RecvMessage
+Copies a message from a PROTORECVEVENT event into the database
+ wParam = 0 (unused)
+ lParam = CCSDATA*
+Returns the result of MS_DB_EVENT_ADD
+*/
#define PSR_MESSAGE "/RecvMessage"
#define MS_PROTO_RECVMSG "Proto/RecvMessage"
+__forceinline INT_PTR Proto_RecvMessage(HANDLE hContact, PROTORECVEVENT *pcre)
+{
+ CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)pcre };
+ return CallService(MS_PROTO_RECVMSG, 0, (LPARAM)&ccs );
+}
+
+/* Proto/AuthRecv
+Copies the EVENTTYPE_AUTHREQUEST event from PROTORECVEVENT into DBEVENTINFO and adds it
+ wParam = char* : protocol name
+ lParam = PROTORECVEVENT*
+Returns the result of MS_DB_EVENT_ADD
+*/
+#define MS_PROTO_AUTHRECV "Proto/AuthRecv"
+
+__forceinline INT_PTR Proto_AuthRecv(const char *szProtoName, PROTORECVEVENT *pcre)
+{ return CallService(MS_PROTO_AUTHRECV, (WPARAM)szProtoName, (LPARAM)pcre);
+}
+
+//File(s) have been received
+//wParam = 0
+//lParam = (LPARAM)(PROTORECVFILET*)&prf
+
+typedef struct {
+ DWORD flags;
+ DWORD timestamp; //unix time
+ TCHAR *tszDescription;
+ int fileCount;
+ TCHAR **ptszFiles;
+ LPARAM lParam; //extra space for the network level protocol module
+} PROTORECVFILET;
+
+#define PSR_FILE "/RecvFile"
+
+#define MS_PROTO_RECVFILET "Proto/RecvFileT"
+
+__forceinline INT_PTR Proto_RecvFile(HANDLE hContact, PROTORECVFILET *pcre)
+{
+ CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)pcre };
+ return CallService(MS_PROTO_RECVFILET, 0, ( LPARAM )&ccs);
+}
+
+
//An URL has been received
//wParam = 0
//lParam = (LPARAM)(PROTORECVEVENT*)&pre
@@ -767,33 +815,6 @@ zero-terminated, binary data should be converted to text. Use PS_ADDTOLISTBYEVENT to add the contacts from one of these to the list.
*/
-//File(s) have been received (0.9.x)
-//wParam = 0
-//lParam = (LPARAM)(PROTORECVFILE*)&prf
-typedef struct {
- DWORD flags;
- DWORD timestamp; //unix time
- TCHAR *tszDescription;
- int fileCount;
- TCHAR **ptszFiles;
- LPARAM lParam; //extra space for the network level protocol module
-} PROTORECVFILET;
-
-#define MS_PROTO_RECVFILET "Proto/RecvFileT"
-
-#define PSR_FILE "/RecvFile"
-
-// left for compatibility with the old Miranda versions.
-
-typedef struct {
- DWORD flags;
- DWORD timestamp; //unix time
- char *szDescription;
- char **pFiles;
- LPARAM lParam; //extra space for the network level protocol module
-} PROTORECVFILE;
-#define MS_PROTO_RECVFILE "Proto/RecvFile"
-
//An away message reply has been received
//wParam = statusMode
//lParam = (LPARAM)(PROTORECVEVENT*)&pre
|