1 /*---------------------------------------------------------------------------*
2 
3   Copyright (C) 2012 Nintendo. All rights reserved.
4 
5   These coded instructions, statements, and computer programs contain
6   proprietary information of Nintendo of America Inc. and/or Nintendo
7   Company Ltd., and are protected by Federal copyright law.  They may
8   not be disclosed to third parties or copied or duplicated in any form,
9   in whole or in part, without the prior written consent of Nintendo.
10 
11  *---------------------------------------------------------------------------*/
12 
13 #ifndef __FP_RESULT_H__
14 #define __FP_RESULT_H__
15 
16 #include <nn/Result.h>
17 #include <nn/Modules.h>
18 
19 namespace nn { namespace fp {
20 
21 //! @addtogroup    nn_fp_result
22 //! @{
23 
24 
25 /*!
26     @class    nn::fp::ResultProgrammingError
27     @brief     Programming error.
28 
29     Handling this <tt>Result</tt> object catches all of the following <tt>Result</tt> objects.
30 
31     @li <tt>@ref nn::fp::ResultNotInitialized</tt>
32     @li <tt>@ref nn::fp::ResultAlreadyInitialized</tt>
33     @li <tt>@ref nn::fp::ResultInvalidArgument</tt>
34     @li <tt>@ref nn::fp::ResultBusy</tt>
35     @li <tt>@ref nn::fp::ResultNetworkClockInvalid</tt>
36     @li <tt>@ref nn::fp::ResultNotPermitted</tt>
37 
38 
39 */
40 NN_DEFINE_RESULT_CONST_RANGE(
41     ResultProgrammingError,
42     nn::Result::LEVEL_USAGE, nn::RESULT_MODULE_NN_FP, 1280, 1280, 12800
43 );
44 
45 /*!
46     @class    nn::fp::ResultNotInitialized
47     @brief     The library has not been initialized.
48 
49     This result is subsumed by the following results and can be caught by handling any of them.
50 
51     @li <tt>@ref nn::fp::ResultProgrammingError</tt>
52 
53 
54 */
55 NN_DEFINE_RESULT_CONST_RANGE(
56     ResultNotInitialized,
57     nn::Result::LEVEL_USAGE, nn::RESULT_MODULE_NN_FP, 1408, 1408, 1536
58 );
59 
60 /*!
61     @class    nn::fp::ResultAlreadyInitialized
62     @brief     The library is already initialized.
63 
64     This result is subsumed by the following results and can be caught by handling any of them.
65 
66     @li <tt>@ref nn::fp::ResultProgrammingError</tt>
67 
68 
69 */
70 NN_DEFINE_RESULT_CONST_RANGE(
71     ResultAlreadyInitialized,
72     nn::Result::LEVEL_USAGE, nn::RESULT_MODULE_NN_FP, 1536, 1536, 1664
73 );
74 
75 /*!
76     @class    nn::fp::ResultInvalidArgument
77     @brief     Invalid parameter.
78 
79     This result is subsumed by the following results and can be caught by handling any of them.
80 
81     @li <tt>@ref nn::fp::ResultProgrammingError</tt>
82 
83 
84 */
85 NN_DEFINE_RESULT_CONST_RANGE(
86     ResultInvalidArgument,
87     nn::Result::LEVEL_USAGE, nn::RESULT_MODULE_NN_FP, 1664, 1664, 1792
88 );
89 
90 /*!
91     @class    nn::fp::ResultBusy
92     @brief     Too many calls to the asynchronous process.
93 
94     This result is subsumed by the following results and can be caught by handling any of them.
95 
96     @li <tt>@ref nn::fp::ResultProgrammingError</tt>
97 
98 
99 */
100 NN_DEFINE_RESULT_CONST_RANGE(
101     ResultBusy,
102     nn::Result::LEVEL_USAGE, nn::RESULT_MODULE_NN_FP, 1792, 1792, 1920
103 );
104 
105 /*!
106     @class    nn::fp::ResultNetworkClockInvalid
107     @brief     The network time is not yet valid.
108 
109     This result is subsumed by the following results and can be caught by handling any of them.
110 
111     @li <tt>@ref nn::fp::ResultProgrammingError</tt>
112 
113 
114 */
115 NN_DEFINE_RESULT_CONST_RANGE(
116     ResultNetworkClockInvalid,
117     nn::Result::LEVEL_USAGE, nn::RESULT_MODULE_NN_FP, 1920, 1920, 2048
118 );
119 
120 /*!
121     @class    nn::fp::ResultNotPermitted
122     @brief     Use of this function is not permitted.
123 
124     This result is subsumed by the following results and can be caught by handling any of them.
125 
126     @li <tt>@ref nn::fp::ResultProgrammingError</tt>
127 
128 
129 */
130 NN_DEFINE_RESULT_CONST_RANGE(
131     ResultNotPermitted,
132     nn::Result::LEVEL_USAGE, nn::RESULT_MODULE_NN_FP, 2048, 2048, 2176
133 );
134 
135 /*!
136     @class    nn::fp::ResultSystemError
137     @brief     System error. Display the network error code.
138 
139     Handling this <tt>Result</tt> object catches all of the following <tt>Result</tt> objects.
140 
141     @li <tt>@ref nn::fp::ResultCoreOperationAborted</tt>
142     @li <tt>@ref nn::fp::ResultCoreTimeout</tt>
143     @li <tt>@ref nn::fp::ResultCoreInitializationFailure</tt>
144     @li <tt>@ref nn::fp::ResultTransportConnectionFailure</tt>
145     @li <tt>@ref nn::fp::ResultFpdNotConnected</tt>
146     @li <tt>@ref nn::fp::ResultFpdAddFriendProhibited</tt>
147     @li <tt>@ref nn::fp::ResultFpdInvalidAccount</tt>
148     @li <tt>@ref nn::fp::ResultFpdBlacklistedByMe</tt>
149     @li <tt>@ref nn::fp::ResultFpdFriendAlreadyAdded</tt>
150     @li <tt>@ref nn::fp::ResultFpdMyFriendListLimitExceed</tt>
151     @li <tt>@ref nn::fp::ResultFpdRequestLimitExceed</tt>
152     @li <tt>@ref nn::fp::ResultFpdFriendRequestBlocked</tt>
153     @li <tt>@ref nn::fp::ResultFpdNotInMyFriendList</tt>
154     @li <tt>@ref nn::fp::ResultFpdFriendListedByMe</tt>
155     @li <tt>@ref nn::fp::ResultFpdNotInMyBlacklist</tt>
156     @li <tt>@ref nn::fp::ResultFpdNotNetworkAccount</tt>
157     @li <tt>@ref nn::fp::ResultFpdPreferenceNotInitialized</tt>
158     @li <tt>@ref nn::fp::ResultFpdFriendRequestNotAllowed</tt>
159 
160 
161 */
162 NN_DEFINE_RESULT_CONST_RANGE(
163     ResultSystemError,
164     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 12800, 12800, 128000
165 );
166 
167 /*!
168     @class    nn::fp::ResultCoreOperationAborted
169     @brief     Indicates that the process was aborted. Issued when the network is disconnected during an asynchronous process.
170 
171     This result is subsumed by the following results and can be caught by handling any of them.
172 
173     @li <tt>@ref nn::fp::ResultSystemError</tt>
174 
175 
176 */
177 NN_DEFINE_RESULT_CONST_RANGE(
178     ResultCoreOperationAborted,
179     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 13440, 13440, 13568
180 );
181 
182 /*!
183     @class    nn::fp::ResultCoreTimeout
184     @brief     Indicates that an asynchronous process has timed out.
185 
186     This result is subsumed by the following results and can be caught by handling any of them.
187 
188     @li <tt>@ref nn::fp::ResultSystemError</tt>
189 
190 
191 */
192 NN_DEFINE_RESULT_CONST_RANGE(
193     ResultCoreTimeout,
194     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 14336, 14336, 14464
195 );
196 
197 /*!
198     @class    nn::fp::ResultCoreInitializationFailure
199     @brief     Indicates that starting an asynchronous process failed.
200 
201     This result is subsumed by the following results and can be caught by handling any of them.
202 
203     @li <tt>@ref nn::fp::ResultSystemError</tt>
204 
205 
206 */
207 NN_DEFINE_RESULT_CONST_RANGE(
208     ResultCoreInitializationFailure,
209     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 14464, 14464, 14592
210 );
211 
212 /*!
213     @class    nn::fp::ResultTransportConnectionFailure
214     @brief     Indicates that there was no response from the friend server. This result also occurs when not connected to the network or when the asynchronous process was forcibly terminated.
215 
216     This result is subsumed by the following results and can be caught by handling any of them.
217 
218     @li <tt>@ref nn::fp::ResultSystemError</tt>
219 
220 
221 */
222 NN_DEFINE_RESULT_CONST_RANGE(
223     ResultTransportConnectionFailure,
224     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 64256, 64256, 64384
225 );
226 
227 /*!
228     @class    nn::fp::ResultFpdNotConnected
229     @brief     Indicates that the local user is not logged in to the friend server.
230 
231     This result is subsumed by the following results and can be caught by handling any of them.
232 
233     @li <tt>@ref nn::fp::ResultSystemError</tt>
234 
235 
236 */
237 NN_DEFINE_RESULT_CONST_RANGE(
238     ResultFpdNotConnected,
239     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 90112, 90112, 90240
240 );
241 
242 /*!
243     @class    nn::fp::ResultFpdAddFriendProhibited
244     @brief     Indicates that the addition of friends is prohibited by Parental Controls.
245 
246     This result is subsumed by the following results and can be caught by handling any of them.
247 
248     @li <tt>@ref nn::fp::ResultSystemError</tt>
249 
250 
251 */
252 NN_DEFINE_RESULT_CONST_RANGE(
253     ResultFpdAddFriendProhibited,
254     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 92800, 92800, 92928
255 );
256 
257 /*!
258     @class    nn::fp::ResultFpdInvalidAccount
259     @brief     Indicates that a non-existent user or oneself has been specified.
260 
261     This result is subsumed by the following results and can be caught by handling any of them.
262 
263     @li <tt>@ref nn::fp::ResultSystemError</tt>
264 
265 
266 */
267 NN_DEFINE_RESULT_CONST_RANGE(
268     ResultFpdInvalidAccount,
269     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 93056, 93056, 93184
270 );
271 
272 /*!
273     @class    nn::fp::ResultFpdBlacklistedByMe
274     @brief     Indicates that the specified user has been added to the blacklist.
275 
276     This result is subsumed by the following results and can be caught by handling any of them.
277 
278     @li <tt>@ref nn::fp::ResultSystemError</tt>
279 
280 
281 */
282 NN_DEFINE_RESULT_CONST_RANGE(
283     ResultFpdBlacklistedByMe,
284     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 93184, 93184, 93312
285 );
286 
287 /*!
288     @class    nn::fp::ResultFpdFriendAlreadyAdded
289     @brief     Indicates that the specified user has already been added to the friend list.
290 
291     This result is subsumed by the following results and can be caught by handling any of them.
292 
293     @li <tt>@ref nn::fp::ResultSystemError</tt>
294 
295 
296 */
297 NN_DEFINE_RESULT_CONST_RANGE(
298     ResultFpdFriendAlreadyAdded,
299     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 93440, 93440, 93568
300 );
301 
302 /*!
303     @class    nn::fp::ResultFpdMyFriendListLimitExceed
304     @brief     Indicates that the friend could not be added because the limit on the number of people who can be registered in the friend list has been reached.
305 
306     This result is subsumed by the following results and can be caught by handling any of them.
307 
308     @li <tt>@ref nn::fp::ResultSystemError</tt>
309 
310 
311 */
312 NN_DEFINE_RESULT_CONST_RANGE(
313     ResultFpdMyFriendListLimitExceed,
314     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 93568, 93568, 93696
315 );
316 
317 /*!
318     @class    nn::fp::ResultFpdRequestLimitExceed
319     @brief     Indicates that the request could not be sent because the recipient's request list has reached its limit for the number of requests it can receive.
320 
321     This result is subsumed by the following results and can be caught by handling any of them.
322 
323     @li <tt>@ref nn::fp::ResultSystemError</tt>
324 
325 
326 */
327 NN_DEFINE_RESULT_CONST_RANGE(
328     ResultFpdRequestLimitExceed,
329     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 93696, 93696, 93824
330 );
331 
332 /*!
333     @class    nn::fp::ResultFpdFriendRequestBlocked
334     @brief     Indicates that the friend request has been blocked.
335 
336     This result is subsumed by the following results and can be caught by handling any of them.
337 
338     @li <tt>@ref nn::fp::ResultSystemError</tt>
339 
340 
341 */
342 NN_DEFINE_RESULT_CONST_RANGE(
343     ResultFpdFriendRequestBlocked,
344     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 94208, 94208, 94336
345 );
346 
347 /*!
348     @class    nn::fp::ResultFpdNotInMyFriendList
349     @brief     Indicates that a user who does not exist in the friend list has been specified.
350 
351     This result is subsumed by the following results and can be caught by handling any of them.
352 
353     @li <tt>@ref nn::fp::ResultSystemError</tt>
354 
355 
356 */
357 NN_DEFINE_RESULT_CONST_RANGE(
358     ResultFpdNotInMyFriendList,
359     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 94336, 94336, 94464
360 );
361 
362 /*!
363     @class    nn::fp::ResultFpdFriendListedByMe
364     @brief     Indicates an attempt to add a friend to the blacklist.
365 
366     This result is subsumed by the following results and can be caught by handling any of them.
367 
368     @li <tt>@ref nn::fp::ResultSystemError</tt>
369 
370 
371 */
372 NN_DEFINE_RESULT_CONST_RANGE(
373     ResultFpdFriendListedByMe,
374     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 94464, 94464, 94592
375 );
376 
377 /*!
378     @class    nn::fp::ResultFpdNotInMyBlacklist
379     @brief     Indicates that the specified user is not on the blacklist.
380 
381     This result is subsumed by the following results and can be caught by handling any of them.
382 
383     @li <tt>@ref nn::fp::ResultSystemError</tt>
384 
385 
386 */
387 NN_DEFINE_RESULT_CONST_RANGE(
388     ResultFpdNotInMyBlacklist,
389     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 94592, 94592, 94720
390 );
391 
392 /*!
393     @class    nn::fp::ResultFpdNotNetworkAccount
394     @brief     Indicates that the network account is not loaded.
395 
396     This result is subsumed by the following results and can be caught by handling any of them.
397 
398     @li <tt>@ref nn::fp::ResultSystemError</tt>
399 
400 
401 */
402 NN_DEFINE_RESULT_CONST_RANGE(
403     ResultFpdNotNetworkAccount,
404     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 95232, 95232, 95360
405 );
406 
407 /*!
408     @class    nn::fp::ResultFpdPreferenceNotInitialized
409     @brief     Indicates that the friend list settings have not been performed even once.
410 
411     This result is subsumed by the following results and can be caught by handling any of them.
412 
413     @li <tt>@ref nn::fp::ResultSystemError</tt>
414 
415 
416 */
417 NN_DEFINE_RESULT_CONST_RANGE(
418     ResultFpdPreferenceNotInitialized,
419     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 95488, 95488, 95616
420 );
421 
422 /*!
423     @class    nn::fp::ResultFpdFriendRequestNotAllowed
424     @brief     Indicates that the sending of friend requests is not allowed.
425 
426     This result is subsumed by the following results and can be caught by handling any of them.
427 
428     @li <tt>@ref nn::fp::ResultSystemError</tt>
429 
430 
431 */
432 NN_DEFINE_RESULT_CONST_RANGE(
433     ResultFpdFriendRequestNotAllowed,
434     nn::Result::LEVEL_STATUS, nn::RESULT_MODULE_NN_FP, 95616, 95616, 95744
435 );
436 
437 //! @}
438 
439 }}
440 
441 #endif // __FP_RESULT_H__
442