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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
hypertarget{sampCommands_8c}{
\section{sampCommands.c File Reference}
\label{sampCommands_8c}\index{sampCommands.c@{sampCommands.c}}
}
SAMP commands used by app to send administrative messages.
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$time.h$>$}\par
{\tt \#include $<$ctype.h$>$}\par
{\tt \#include \char`\"{}samp.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item
int \hyperlink{sampCommands_8c_84ffd50bd4b8dc79e9cf32398c6b3d69}{samp\_\-Register} (handle\_\-t handle)
\begin{CompactList}\small\item\em Register with the \hyperlink{structHub}{Hub} using the currently stored metadata. \item\end{CompactList}\item
int \hyperlink{sampCommands_8c_106fc27544de7c25625ed60eb48e4edd}{samp\_\-UnRegister} (handle\_\-t handle)
\begin{CompactList}\small\item\em Un-Register from the hub. \item\end{CompactList}\item
int \hyperlink{sampCommands_8c_9c6024ae76103069355256c29ee22722}{samp\_\-DeclareMetadata} (handle\_\-t handle)
\begin{CompactList}\small\item\em (Re)Declare all of our metadata. \item\end{CompactList}\item
int \hyperlink{sampCommands_8c_2be0812dc8d34c68407c62762f727c51}{samp\_\-Ping} (handle\_\-t handle, \hyperlink{sampDecl_8h_2efe6d463d80744789f228f5dc4baa39}{String} appName)
\begin{CompactList}\small\item\em Ping the hub/app to see if it is alive (returns $>$0). \item\end{CompactList}\item
\hyperlink{sampDecl_8h_39a90bc041db57e1a6ba736ba91eee30}{Map} \hyperlink{sampCommands_8c_2ac4b5c50094c394a74f18d6ebe3cd91}{samp\_\-GetMetadata} (handle\_\-t handle, \hyperlink{sampDecl_8h_2efe6d463d80744789f228f5dc4baa39}{String} pubId)
\begin{CompactList}\small\item\em Get the metadata for a specified app. \item\end{CompactList}\item
int \hyperlink{sampCommands_8c_d2b0bdea58688142f55faeffcfc65525}{samp\_\-DeclareSubscriptions} (handle\_\-t handle)
\begin{CompactList}\small\item\em Declare the messages we're interested in. \item\end{CompactList}\item
\hypertarget{sampCommands_8c_c4f65b6315c8bd7380176d2b97462354}{
\hyperlink{sampDecl_8h_39a90bc041db57e1a6ba736ba91eee30}{Map} \textbf{samp\_\-GetSubscriptions} (handle\_\-t handle, \hyperlink{sampDecl_8h_2efe6d463d80744789f228f5dc4baa39}{String} pubId)}
\label{sampCommands_8c_c4f65b6315c8bd7380176d2b97462354}
\item
\hyperlink{sampDecl_8h_39f9d235896a8fd920f319105eb82791}{List} \hyperlink{sampCommands_8c_954712a523e3f86826b4711abd35b165}{samp\_\-GetRegisteredClients} (handle\_\-t handle)
\begin{CompactList}\small\item\em Get public-ids of the registered clients. \item\end{CompactList}\item
\hyperlink{sampDecl_8h_39f9d235896a8fd920f319105eb82791}{List} \hyperlink{sampCommands_8c_367a24fc0aa7a81416e6a0d0dbfcd93f}{samp\_\-GetSubscribedClients} (handle\_\-t handle, \hyperlink{sampDecl_8h_2efe6d463d80744789f228f5dc4baa39}{String} mtype)
\begin{CompactList}\small\item\em Get clients matching the mtype subscription. \item\end{CompactList}\end{CompactItemize}
\label{_details}
\hypertarget{_details}{}
\subsection{Detailed Description}
SAMP commands used by app to send administrative messages.
SAMPCOMMANDS.C -- SAMP commands used by app to send administrative messages.
stat = samp\_\-Register (handle) stat = samp\_\-UnRegister (handle) stat = samp\_\-DeclareMetadata (handle) stat = samp\_\-Ping (handle, appName) map = samp\_\-GetMetadata (handle, pubId) samp\_\-DeclareSubscriptions (handle) map = samp\_\-GetSubscriptions (handle) list = samp\_\-GetRegisteredClients (handle) list = samp\_\-GetSubscribedClients (handle, mtype)
\begin{Desc}
\item[Author:]Mike Fitzpatrick \end{Desc}
\begin{Desc}
\item[Date:]7/10/11 \end{Desc}
\subsection{Function Documentation}
\hypertarget{sampCommands_8c_9c6024ae76103069355256c29ee22722}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-DeclareMetadata@{samp\_\-DeclareMetadata}}
\index{samp\_\-DeclareMetadata@{samp\_\-DeclareMetadata}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-DeclareMetadata}]{\setlength{\rightskip}{0pt plus 5cm}int samp\_\-DeclareMetadata (handle\_\-t {\em handle})}}
\label{sampCommands_8c_9c6024ae76103069355256c29ee22722}
(Re)Declare all of our metadata.
SAMP\_\-DECLAREMETATA -- (Re)Declare all of our metadata.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]SAMP\_\-OK or SAMP\_\-ERR \end{Desc}
References Samp::hub, hub, and samp\_\-hubDeclareMetadata().\hypertarget{sampCommands_8c_d2b0bdea58688142f55faeffcfc65525}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-DeclareSubscriptions@{samp\_\-DeclareSubscriptions}}
\index{samp\_\-DeclareSubscriptions@{samp\_\-DeclareSubscriptions}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-DeclareSubscriptions}]{\setlength{\rightskip}{0pt plus 5cm}int samp\_\-DeclareSubscriptions (handle\_\-t {\em handle})}}
\label{sampCommands_8c_d2b0bdea58688142f55faeffcfc65525}
Declare the messages we're interested in.
SAMP\_\-DECLARESUBSCRIPIONS -- Declare the messages we're interested in.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]SAMP\_\-OK or SAMP\_\-ERR \end{Desc}
References Samp::hub, hub, and samp\_\-hubDeclareSubscriptions().
Referenced by samp\_\-Unsubscribe().\hypertarget{sampCommands_8c_2ac4b5c50094c394a74f18d6ebe3cd91}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-GetMetadata@{samp\_\-GetMetadata}}
\index{samp\_\-GetMetadata@{samp\_\-GetMetadata}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-GetMetadata}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Map} samp\_\-GetMetadata (handle\_\-t {\em handle}, \/ {\bf String} {\em pubId})}}
\label{sampCommands_8c_2ac4b5c50094c394a74f18d6ebe3cd91}
Get the metadata for a specified app.
SAMP\_\-GETMETADATA -- Get the metadata for a specified app.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \item[{\em pubId}]App public-id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Map to message response \end{Desc}
References Samp::errortxt, Samp::hub, hub, Hub::id, and Hub::privateKey.
Referenced by samp\_\-mapClients().\hypertarget{sampCommands_8c_954712a523e3f86826b4711abd35b165}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-GetRegisteredClients@{samp\_\-GetRegisteredClients}}
\index{samp\_\-GetRegisteredClients@{samp\_\-GetRegisteredClients}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-GetRegisteredClients}]{\setlength{\rightskip}{0pt plus 5cm}{\bf List} samp\_\-GetRegisteredClients (handle\_\-t {\em handle})}}
\label{sampCommands_8c_954712a523e3f86826b4711abd35b165}
Get public-ids of the registered clients.
SAMP\_\-GETREGISTEREDCLIENTS -- Get public-ids of the registered clients.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]handle to list of registered clients \end{Desc}
References Samp::hub, Hub::id, Hub::privateKey, samp\_\-listLen(), samp\_\-newList(), and samp\_\-setStringInList().
Referenced by samp\_\-mapClients().\hypertarget{sampCommands_8c_367a24fc0aa7a81416e6a0d0dbfcd93f}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-GetSubscribedClients@{samp\_\-GetSubscribedClients}}
\index{samp\_\-GetSubscribedClients@{samp\_\-GetSubscribedClients}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-GetSubscribedClients}]{\setlength{\rightskip}{0pt plus 5cm}{\bf List} samp\_\-GetSubscribedClients (handle\_\-t {\em handle}, \/ {\bf String} {\em mtype})}}
\label{sampCommands_8c_367a24fc0aa7a81416e6a0d0dbfcd93f}
Get clients matching the mtype subscription.
SAMP\_\-GETSUBSCRIBEDCLIENTS -- Get clients matching the mtype subscription.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \item[{\em mtype}]mtype string \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]handle to list of clients having mtype subscription \end{Desc}
References Samp::hub, Hub::id, Hub::privateKey, samp\_\-listLen(), samp\_\-newList(), and samp\_\-setStringInList().\hypertarget{sampCommands_8c_2be0812dc8d34c68407c62762f727c51}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-Ping@{samp\_\-Ping}}
\index{samp\_\-Ping@{samp\_\-Ping}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-Ping}]{\setlength{\rightskip}{0pt plus 5cm}int samp\_\-Ping (handle\_\-t {\em handle}, \/ {\bf String} {\em appName})}}
\label{sampCommands_8c_2be0812dc8d34c68407c62762f727c51}
Ping the hub/app to see if it is alive (returns $>$0).
SAMP\_\-PING -- Ping the hub/app to see if it is alive (returns $>$0).
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \item[{\em appName}]application name \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or ERR if no response \end{Desc}
References Samp::hub, samp\_\-app2id(), samp\_\-callAll(), samp\_\-callAndWait(), samp\_\-freeMap(), samp\_\-freeMsg(), samp\_\-hubPing(), samp\_\-msgParam(), samp\_\-newMsg(), samp\_\-newParam(), and samp\_\-setErr().\hypertarget{sampCommands_8c_84ffd50bd4b8dc79e9cf32398c6b3d69}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-Register@{samp\_\-Register}}
\index{samp\_\-Register@{samp\_\-Register}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-Register}]{\setlength{\rightskip}{0pt plus 5cm}int samp\_\-Register (handle\_\-t {\em handle})}}
\label{sampCommands_8c_84ffd50bd4b8dc79e9cf32398c6b3d69}
Register with the \hyperlink{structHub}{Hub} using the currently stored metadata.
SAMP\_\-REGISTER -- Register with the \hyperlink{structHub}{Hub} using the currently stored metadata.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]SAMP\_\-OK or SAMP\_\-ERR \end{Desc}
References Samp::hub, hub, Hub::hubId, Hub::id, Hub::privateKey, samp\_\-replyStatus(), Hub::secret, and Hub::selfId.\hypertarget{sampCommands_8c_106fc27544de7c25625ed60eb48e4edd}{
\index{sampCommands.c@{sampCommands.c}!samp\_\-UnRegister@{samp\_\-UnRegister}}
\index{samp\_\-UnRegister@{samp\_\-UnRegister}!sampCommands.c@{sampCommands.c}}
\subsubsection[{samp\_\-UnRegister}]{\setlength{\rightskip}{0pt plus 5cm}int samp\_\-UnRegister (handle\_\-t {\em handle})}}
\label{sampCommands_8c_106fc27544de7c25625ed60eb48e4edd}
Un-Register from the hub.
SAMP\_\-UNREGISTER -- Un-Register from the hub.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]samp struct handle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]SAMP\_\-OK or SAMP\_\-ERR \end{Desc}
References Samp::hub, hub, and samp\_\-hubUnRegister().
|