-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfilenetmessages.inc
More file actions
114 lines (88 loc) · 2.6 KB
/
filenetmessages.inc
File metadata and controls
114 lines (88 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#if defined _filenetmessages_included
#endinput
#endif
#define _filenetmessages_included
/*
* The natives work quite pretty.
* But the forwards are really tricky, no idea when they really fire.
*/
/**
* Called when a file was received from a client to the server.
* Was fired when requesting a file and it doesn't exist and was succesfulled downloaded.
*
* @param client Client index.
* @param file File that was received.
* @param transferID transfer ID.
*/
forward FNM_OnFileReceived(client, const String:file[], transferID);
/**
* Called when a client requests a file from the server.
*
* @param client Client index.
* @param file File that was requested.
* @param transferID transfer ID.
*
* @return Plugin_Stop to deny the request, Plugin_Continue otherwise.
*/
forward Action:FNM_OnFileRequested(client, const String:file[], transferID);
/**
* Called when a client denies a file request from the server.
* Was fired when requesting a file, but filed doesn't exist.
*
* @param client Client index.
* @param file File that was denied.
* @param transferID transfer ID.
*/
forward FNM_OnFileDenied(client, const String:file[], transferID);
/**
* Called when a file was sent to a client.
* Was never fired :/
*
* @param client Client index.
* @param file File that was sent.
* @param transferID transfer ID.
*/
forward FNM_OnFileSent(client, const String:file[], transferID);
/**
* Sends a file to a client
*
* @param client Client to send file.
* @param file File to send.
* @param ... Variable number of format parameters.
*
* @return TransferID on success, otherwise 0.
*/
native FNM_SendFile(client, const String:file[], any:...);
/**
* Requests a file from a client
*
* @param client Client to get file from.
* @param file File to request.
* @param ... Variable number of format parameters.
*
* @return TransferID of the request.
*/
native FNM_RequestFile(client, const String:file[], any:...);
/** Do Not Edit Below This Line **/
public Extension:__ext_filenetmessages =
{
name = "filenetmessages",
file = "filenetmessages.ext",
#if defined AUTOLOAD_EXTENSIONS
autoload = 1,
#else
autoload = 0,
#endif
#if defined REQUIRE_EXTENSIONS
required = 1,
#else
required = 0,
#endif
};
#if !defined REQUIRE_EXTENSIONS
public __ext_filenetmessages_SetNTVOptional()
{
MarkNativeAsOptional("FNM_SendFile");
MarkNativeAsOptional("FNM_RequestFile");
}
#endif