CTR Pia  4.11.3
Game Communication Engine
result.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: result.h
4 
5  Copyright Nintendo. All rights reserved.
6 
7  These coded instructions, statements, and computer programs contain
8  proprietary information of Nintendo of America Inc. and/or Nintendo
9  Company Ltd., and are protected by Federal copyright law. They may
10  not be disclosed to third parties or copied or duplicated in any form,
11  in whole or in part, without the prior written consent of Nintendo.
12  *---------------------------------------------------------------------------*/
13 
14 
15 //This is the header for using the <tt>nn::Result</tt> type in Pia.
16 
17 #pragma once
18 
19 #include <pia/platform.h>
20 #include <pia/assertableResult.h>
21 
22 /*!
23 @namespace nn::pia
24 @brief Represents the namespace for the Pia API.
25 
26 @details Most of the functions in the Pia API are not thread-safe.
27 Do not take it as a guarantee that a function will be thread-safe if nothing is written about it being either thread-safe or not thread-safe in its specific entry within the API Reference.
28 (We will note thread-safe functions in future revisions to the documentation.)
29 
30 @date 2014-10-29 Added <tt>ResultNexInternalError</tt>.
31 @date 2014-09-12 Added <tt>ResultSessionConnectionIsLost</tt>, <tt>ResultInProgress</tt>, and <tt>ResultNotSet</tt>.
32 @date 2014-09-11 Consolidated all of the Pia Results into this header file.
33 @date 2014-07-16 Added <tt>ResultTemporaryUnavailable</tt>.
34 @date 2013-03-26 Added <tt>MODULE_TYPE_DB</tt>.
35 @date 2012-07-25 The <tt>NN_PIA_ENABLE_TRACE</tt> macro is now also set to a valid value in Development builds.
36 @date 2012-07-18 Added information about <tt>DESCRIPTION_BUFFER_IS_FULL</tt> and <tt>ResultBufferIsFull</tt>.
37 @date 2012-07-12 Added <tt>MODULE_TYPE_UTIL</tt>.
38 @date 2012-07-10 Deleted old <tt>Result</tt> definitions that had been kept for compatibility.
39 @date 2012-04-05 Merged generic <tt>Result</tt> values used in each module. They are now defined in the <tt>nn::pia</tt> namespace.
40 @date 2011-11-17 Excluding some exceptions, noted that the Pia API is not guaranteed to be thread-safe.
41 @date 2011-11-14 Expanded on the documentation of <tt>ModuleType</tt> and <tt>ErrorSeverity</tt>.
42 @date 2011-11-08 Created a page for the <tt>nn::pia</tt> namespace.
43 
44 */
45 namespace nn
46 {
47 namespace pia
48 {
49 
50 /*!
51 @brief Enumerates modules in the Pia library.
52 You get one of these values when you pass a <tt>nn::Result</tt> value to the <tt>@ref nn::pia::common::ErrorHandler::GetModuleTypeFromResult</tt> function. Use this value to determine the module in which an error occurred.
53 */
55 {
56  MODULE_TYPE_RESERVED = 0, //!< Reserved value. The <tt>GetModuleTypeFromResult</tt> function never returns this value.
57  MODULE_TYPE_PIA, //!< Represents a generic <tt>Result</tt> value.
58  MODULE_TYPE_COMMON, //!< Represents a <tt>PiaCommon</tt> <tt>Result</tt> value.
59  MODULE_TYPE_LOCAL, //!< Represents a <tt>PiaLocal</tt> <tt>Result</tt> value.
60  MODULE_TYPE_TRANSPORT, //!< Represents a <tt>PiaTransport</tt> <tt>Result</tt> value.
61  MODULE_TYPE_SYNC, //!< Represents a <tt>PiaSync</tt> <tt>Result</tt> value.
62  MODULE_TYPE_INET, //!< Represents a <tt>PiaInet</tt> <tt>Result</tt> value.
63  MODULE_TYPE_SESSION, //!< Represents a <tt>PiaSession</tt> <tt>Result</tt> value.
64  MODULE_TYPE_UTIL, //!< Represents a <tt>PiaUtil</tt> <tt>Result</tt> value.
65  MODULE_TYPE_SERVICE, //!< Represents a <tt>PiaService</tt> <tt>Result</tt> value.
66  MODULE_TYPE_DB, //!< Represents a <tt>PiaDB</tt> <tt>Result</tt> value.
67  MODULE_TYPE_CHAT, //!< Represents a <tt>PiaChat</tt> <tt>Result</tt> value.
68  MODULE_TYPE_CLONE, //!< Represents a <tt>PiaClone</tt> <tt>Result</tt> value.
69  MODULE_TYPE_RECKONING, //!< Represents a <tt>PiaReckonng</tt> <tt>Result</tt> value.
70  MODULE_TYPE_BRAIN, //!< Represents a <tt>PiaBrain</tt> <tt>Result</tt> value.
71  MODULE_TYPE_UNKNOWN = 0x0f, //!< Indicates that a Pia module is not the source.
72  MODULE_TYPE_MAX = 0x10 //!< The maximum value. The application is not required to use this value.
73 };
74 
75 /*!
76 @cond PRIVATE
77 */
78 const u32 RESULT_MODULE_TYPE_FIELD = 4; //<tt>ModuleType</tt> is represented by 4 bits.
79 const u32 RESULT_DESCRIPTION_FIELD = 5; //<tt>Description</tt> can be represented by 5 bits.
80 const u32 RESULT_DESCRIPTION_MIN = 0; //The minimum value for <tt>Description</tt>.
81 const u32 RESULT_DESCRIPTION_MAX = 31; //The maximum value for <tt>Description</tt>.
82 
83 const u32 NN_PIA_ERROR_BIT = MODULE_TYPE_PIA << RESULT_DESCRIPTION_FIELD;
84 const u32 NN_PIA_COMMON_ERROR_BIT = MODULE_TYPE_COMMON << RESULT_DESCRIPTION_FIELD;
85 const u32 NN_PIA_LOCAL_ERROR_BIT = MODULE_TYPE_LOCAL << RESULT_DESCRIPTION_FIELD;
86 const u32 NN_PIA_TRANSPORT_ERROR_BIT = MODULE_TYPE_TRANSPORT << RESULT_DESCRIPTION_FIELD;
87 const u32 NN_PIA_SYNC_ERROR_BIT = MODULE_TYPE_SYNC << RESULT_DESCRIPTION_FIELD;
88 const u32 NN_PIA_INET_ERROR_BIT = MODULE_TYPE_INET << RESULT_DESCRIPTION_FIELD;
89 const u32 NN_PIA_SESSION_ERROR_BIT = MODULE_TYPE_SESSION << RESULT_DESCRIPTION_FIELD;
90 const u32 NN_PIA_SESSION_EX_ERROR_BIT= MODULE_TYPE_UTIL << RESULT_DESCRIPTION_FIELD; // (Note) Out of the <tt>description</tt> assigned to <tt>session</tt>, so <tt>util</tt> is being applied intentionally.
91 const u32 NN_PIA_CLONE_ERROR_BIT = MODULE_TYPE_CLONE << RESULT_DESCRIPTION_FIELD;
92 const u32 NN_PIA_BRAIN_ERROR_BIT = MODULE_TYPE_BRAIN << RESULT_DESCRIPTION_FIELD;
93 
94 /*!
95 @brief Enumerates general-purpose Pia <tt>Result</tt> values.
96 */
97 enum Description
98 {
99  DESCRIPTION_ALLOCATION_FAILED = NN_PIA_ERROR_BIT | 0, //!< Indicates a failure to allocate memory or some other resource.
100  DESCRIPTION_ALREADY_INITIALIZED = NN_PIA_ERROR_BIT | 1, //!< Initialization is already complete.
101  DESCRIPTION_BROKEN_DATA = NN_PIA_ERROR_BIT | 2, //!< An error indicating that data received over this connection is corrupt, or may have been tampered with.
102  DESCRIPTION_BUFFER_SHORTAGE = NN_PIA_ERROR_BIT | 3, //!< The buffer passed in the argument is too small.
103  DESCRIPTION_CANCELLED = NN_PIA_ERROR_BIT | 4, //!< The asynchronous process received a cancellation request.
104  DESCRIPTION_NETWORK_CONNECTION_IS_LOST = NN_PIA_ERROR_BIT | 5, //!< The connection was terminated.
105  DESCRIPTION_INVALID_ARGUMENT = NN_PIA_ERROR_BIT | 6, //!< An invalid argument was passed to an API function.
106  DESCRIPTION_INVALID_STATE = NN_PIA_ERROR_BIT | 7, //!< An API function was called at the wrong time. Indicates that the library was not in the correct state to call the function that returned this <tt>Result</tt> value.
107  DESCRIPTION_NO_DATA = NN_PIA_ERROR_BIT | 8, //!< No data.
108  DESCRIPTION_NOT_FOUND = NN_PIA_ERROR_BIT | 9, //!< Requested item not found.
109  DESCRIPTION_NOT_IMPLEMENTED = NN_PIA_ERROR_BIT | 10, //!< Not implemented.
110  DESCRIPTION_NOT_INITIALIZED = NN_PIA_ERROR_BIT | 11, //!< Not initialized.
111  DESCRIPTION_BUFFER_IS_FULL = NN_PIA_ERROR_BIT | 12, //!< The action failed because the buffer required to complete the action temporarily ran out of space. It also may be caused by network congestion. It may succeed if you try again after some time has passed.
112  DESCRIPTION_TIME_OUT = NN_PIA_ERROR_BIT | 13, //!< The asynchronous process timed out.
113  DESCRIPTION_ALREADY_EXISTS = NN_PIA_ERROR_BIT | 14, //!< Already exists.
114  DESCRIPTION_CONTAINER_IS_FULL = NN_PIA_ERROR_BIT | 15, //!< The container is already full.
115  DESCRIPTION_TEMPORARY_UNAVAILABLE = NN_PIA_ERROR_BIT | 16, //!< In a temporarily unusable state.
116  DESCRIPTION_IN_PROGRESS = NN_PIA_ERROR_BIT | 17, //!< The indicated process is already in progress.
117  DESCRIPTION_NOT_SET = NN_PIA_ERROR_BIT | 18, //!< Values that are supposed to be set in advance are not set.
118 
119  DESCRIPTION_MEMORY_LEAK = NN_PIA_COMMON_ERROR_BIT | 0, //!< There may be a memory leak in the Pia library.
120 
121  DESCRIPTION_NOT_FOUND_NETWORK = NN_PIA_LOCAL_ERROR_BIT | 4, //!< Indicates that a network could not be found.
122  DESCRIPTION_INVALID_NODE = NN_PIA_LOCAL_ERROR_BIT | 5, //!< Indicates that the target node does not exist on the network.
123  DESCRIPTION_NOTHING_PACKET = NN_PIA_LOCAL_ERROR_BIT | 6, //!< Indicates that there are no packets to receive.
124  DESCRIPTION_NEGLIGIBLE_FAULT = NN_PIA_LOCAL_ERROR_BIT | 7, //!< Indicates a failure that can be ignored.
125  DESCRIPTION_INVALID_CONNECTION = NN_PIA_LOCAL_ERROR_BIT | 8, //!< Indicates that the station is not connected to the network.
126  DESCRIPTION_HOST_MIGRATION_FAILURE = NN_PIA_LOCAL_ERROR_BIT | 9, //!< Local communication host migration failed.
127  DESCRIPTION_DIFFERENT_VERSION = NN_PIA_LOCAL_ERROR_BIT | 10, //!< The local network version or the application version is different.
128  DESCRIPTION_ERROR_OCCURRED = NN_PIA_LOCAL_ERROR_BIT | 11, //!< An error occurred.
129  DESCRIPTION_INVALID_NETWORK = NN_PIA_LOCAL_ERROR_BIT | 12, //!< Cannot connect to this network.
130  DESCRIPTION_NETWORK_IS_FULL = NN_PIA_LOCAL_ERROR_BIT | 13, //!< The network is full.
131 
132  DESCRIPTION_CONNECTION_FAILED = NN_PIA_TRANSPORT_ERROR_BIT | 1, //!< Connection succeeded.
133  DESCRIPTION_CREATE_STATION_FAILED = NN_PIA_TRANSPORT_ERROR_BIT | 2, //!< Indicates that creating the <tt>Station</tt> instance failed.
134  DESCRIPTION_VERSION_MISMATCHED = NN_PIA_TRANSPORT_ERROR_BIT | 3, //!< Indicates that communication protocol version numbers differ.
135  DESCRIPTION_IS_NOT_IN_COMMUNICATION = NN_PIA_TRANSPORT_ERROR_BIT | 4, //!< Indicates that stations are not communicating.
136  DESCRIPTION_TABLE_IS_FULL = NN_PIA_TRANSPORT_ERROR_BIT | 5, //!< Indicates that no more entries can be added because the table is full.
137 
138  DESCRIPTION_SYNC_BASE = NN_PIA_SYNC_ERROR_BIT | 0, //!< Avoid making the width wide. Do not use.
139  DESCRIPTION_SYNC_NOT_INITIALIZED = NN_PIA_SYNC_ERROR_BIT | 1, //!< Not initialized.
140  DESCRIPTION_SYNC_INVALID_STATE = NN_PIA_SYNC_ERROR_BIT | 2, //!< Not allowed to execute the function in this state.
141  DESCRIPTION_SYNC_INVALID_ARGUMENT = NN_PIA_SYNC_ERROR_BIT | 3, //!< There was a problem with an argument.
142  DESCRIPTION_SYNC_DATA_IS_NOT_ARRIVED_YET = NN_PIA_SYNC_ERROR_BIT | 4, //!< Data has not yet arrived from all stations.
143  DESCRIPTION_SYNC_OUT_OF_RESOURCE = NN_PIA_SYNC_ERROR_BIT | 5, //!< Insufficient resources.
144  DESCRIPTION_SYNC_SYNCHRONIZATION_IS_LOST = NN_PIA_SYNC_ERROR_BIT | 6, //!< Synchronization could not be maintained, and the process lapsed into an error state.
145  DESCRIPTION_SYNC_FAILED_TO_SYNCHRONIZE = NN_PIA_SYNC_ERROR_BIT | 7, //!< Could not synchronize with the station host's start of synchronization.
146  DESCRIPTION_SYNC_INVALID_DEVICE = NN_PIA_SYNC_ERROR_BIT | 8, //!< Failed because you did not specify a target device during initialization.
147  DESCRIPTION_SYNC_TO_BE_IMPLEMENTED = NN_PIA_SYNC_ERROR_BIT | 9, //!< Not implemented.
148  DESCRIPTION_SYNC_DATA_IS_NOT_SET = NN_PIA_SYNC_ERROR_BIT | 10, //!< The data to send has not been specified.
149  DESCRIPTION_SYNC_MAX = NN_PIA_SYNC_ERROR_BIT | RESULT_DESCRIPTION_MAX,
150 
151  DESCRIPTION_NAT_CHECK_FAILED = NN_PIA_INET_ERROR_BIT | 1, //!< The NAT check failed.
152  DESCRIPTION_IN_USED = NN_PIA_INET_ERROR_BIT | 2,
153  DESCRIPTION_DNS_FAILED = NN_PIA_INET_ERROR_BIT | 3, //!< The DNS name resolution prior to the NAT check failed.
154  DESCRIPTION_NEX_INTERNAL_ERROR = NN_PIA_INET_ERROR_BIT | 4, //!< Indicates that the game server returned an unexpected result code.
155 
156  DESCRIPTION_REQUEST_DENIED = NN_PIA_SESSION_ERROR_BIT | 0, //!< Request denied.
157  DESCRIPTION_STATION_CONNECTION_FAILED = NN_PIA_SESSION_ERROR_BIT | 1, //!< Failed to connect stations.
158  DESCRIPTION_MESSAGE_NOT_HANDLED = NN_PIA_SESSION_ERROR_BIT | 2, //!< Could not process the received <tt>ProtocolMessageOld</tt> object.
159  DESCRIPTION_FAILED_CREATE_PROTOCOL = NN_PIA_SESSION_ERROR_BIT | 3, //!< System protocol generation failed.
160  DESCRIPTION_FAILED_STARTUP_PROTOCOL = NN_PIA_SESSION_ERROR_BIT | 4, //!< The system protocol start process failed.
161  DESCRIPTION_MESH_IS_FULL = NN_PIA_SESSION_ERROR_BIT | 5, //!< The mesh is full.
162  DESCRIPTION_INVALID_MESSAGE = NN_PIA_SESSION_ERROR_BIT | 6, //!< Handled an invalid system message.
163  DESCRIPTION_CONNECTION_NAT_TRAVERSAL_FAILED_UNKNOWN = NN_PIA_SESSION_ERROR_BIT | 7, //!< Failed to connect stations. The NAT type is unknown.
164  DESCRIPTION_CONNECTION_NAT_TRAVERSAL_FAILED_EIM = NN_PIA_SESSION_ERROR_BIT | 8, //!< Failed to connect stations. The NAT type is <tt>EIM</tt>. (Removed.)
165  DESCRIPTION_CONNECTION_NAT_TRAVERSAL_FAILED_EDM = NN_PIA_SESSION_ERROR_BIT | 9, //!< Failed to connect stations. The NAT type is <tt>EDM</tt>. (Removed.)
166  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EIM_REMOTE_EIM = NN_PIA_SESSION_ERROR_BIT | 10, //!< Failed to connect stations. The NAT type for both local and remote stations is EIM.
167  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EIM_REMOTE_EDM = NN_PIA_SESSION_ERROR_BIT | 11, //!< Failed to connect stations. The NAT type was EIM for the local station and EDM for the remote station.
168  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EDM_REMOTE_EIM = NN_PIA_SESSION_ERROR_BIT | 12, //!< Failed to connect stations. The NAT type was EDM for the local station and EIM for the remote station.
169  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EDM_REMOTE_EDM = NN_PIA_SESSION_ERROR_BIT | 13, //!< Failed to connect stations. The NAT type for both local and remote stations is EDM.
170  DESCRIPTION_RELAY_FAILED_NO_CANDIDATE = NN_PIA_SESSION_ERROR_BIT | 14, //!< The relay connection failed. (There was no relay candidate.)
171  DESCRIPTION_RELAY_FAILED_RTT_LIMIT = NN_PIA_SESSION_ERROR_BIT | 15, //!< The relay connection failed. (The RTT limit was exceeded.)
172  DESCRIPTION_RELAY_FAILED_RELAY_NUM_LIMIT = NN_PIA_SESSION_ERROR_BIT | 16, //!< The relay connection failed. (The limit on the number of relays was exceeded.)
173  DESCRIPTION_RELAY_FAILED_UNKNOWN = NN_PIA_SESSION_ERROR_BIT | 17, //!< The relay connection failed. (Details unknown.)
174  DESCRIPTION_NAT_TRAVERSAL_REQUEST_TIMEOUT = NN_PIA_SESSION_ERROR_BIT | 18, //!< Failed to connect stations. The NAT traversal request timed out.
175  DESCRIPTION_SESSION_IS_NOT_FOUND = NN_PIA_SESSION_ERROR_BIT | 19, //!< The session was not found.
176  DESCRIPTION_MATCHMAKE_SESSION_IS_FULL = NN_PIA_SESSION_ERROR_BIT | 20, //!< The matchmaking session is full.
177  DESCRIPTION_DENIED_BY_PARTICIPANTS = NN_PIA_SESSION_ERROR_BIT | 21, //!< The local station is blacklisted by a user in the session.
178  DESCRIPTION_PARTICIPANT_IN_BLACKLIST = NN_PIA_SESSION_ERROR_BIT | 22, //!< A user on the local station's blacklist is in the session.
179  DESCRIPTION_GAME_SERVER_MAINTENANCE = NN_PIA_SESSION_ERROR_BIT | 23, //!< The server is under maintenance.
180  DESCRIPTION_MESH_CONNECTION_IS_LOST = NN_PIA_SESSION_ERROR_BIT | 24, //!< The mesh is disconnected.
181  DESCRIPTION_SESSION_USER_PASSWORD_UNMATCH = NN_PIA_SESSION_ERROR_BIT | 25, //!< Attempted to join a session set with a user password, but the user password did not match.
182  DESCRIPTION_SESSION_SYSTEM_PASSWORD_UNMATCH = NN_PIA_SESSION_ERROR_BIT | 26, //!< Attempted to join a session set with a system password, but the system password did not match.
183  DESCRIPTION_SESSION_IS_CLOSED = NN_PIA_SESSION_ERROR_BIT | 27, //!< Attempted to join a session that is closed.
184  DESCRIPTION_COMPANION_STATION_IS_OFFLINE = NN_PIA_SESSION_ERROR_BIT | 28, //!< Attempted to get a companion station to join in the joint session that was not logged in to the server.
185  DESCRIPTION_HOST_IS_NOT_FRIEND = NN_PIA_SESSION_ERROR_BIT | 29, //!< Attempted to join a session with a host that is not a friend.
186  DESCRIPTION_SESSION_CONNECTION_IS_LOST = NN_PIA_SESSION_ERROR_BIT | 30, //!< The session is disconnected.
187 
188  DESCRIPTION_COMPANION_STATION_IS_LEFT = NN_PIA_SESSION_EX_ERROR_BIT | 0, //!< Attempted to specify companion stations for the joint session that were disconnected.
189  DESCRIPTION_COMPANION_STATION_DENIED = NN_PIA_SESSION_EX_ERROR_BIT | 1, //!< Attempted to specify companion stations for the joint session that rejected join-in.
190  DESCRIPTION_SESSION_MIGRATION_FAILED = NN_PIA_SESSION_EX_ERROR_BIT | 2, //!< Processes failed that were necessary for session transitions in joint sessions.
191  DESCRIPTION_GAME_SERVER_PROCESS_ABORTED = NN_PIA_SESSION_EX_ERROR_BIT | 3, //!< The game server process aborted.
192  DESCRIPTION_SESSION_WRONG_STATE = NN_PIA_SESSION_EX_ERROR_BIT | 4, //!< The state of the joined session was irregular.
193  DESCRIPTION_SESSION_INCONSISTENT_STATE = NN_PIA_SESSION_EX_ERROR_BIT | 5, //!< The session is in an inconsistent state.
194  DESCRIPTION_SESSION_INVALID_STATE = NN_PIA_SESSION_EX_ERROR_BIT | 6, //!< The <tt>Session</tt> API is being called in the wrong way.
195 
196  DESCRIPTION_INVALID_TIMING = NN_PIA_CLONE_ERROR_BIT | 1
197 };
198 /** @endcond */
199 
200 /*!
201 @class nn::pia::ResultAllocationFailed
202 @brief Indicates a failure to allocate memory or other resources. Applications must be implemented to ensure this <tt>Result</tt> value is never returned.
203 */
204 PIA_DEFINE_RESULT(
206  Result::LEVEL_USAGE,
207  Result::SUMMARY_OUT_OF_RESOURCE,
208  Result::MODULE_NN_PIA,
209  DESCRIPTION_ALLOCATION_FAILED);
210 
211 /*!
212 @class nn::pia::ResultAlreadyInitialized
213 @brief Indicates that initialization is already complete. Applications must be implemented to ensure this <tt>Result</tt> value is never returned.
214 */
215 PIA_DEFINE_RESULT(
217  Result::LEVEL_USAGE,
218  Result::SUMMARY_INVALID_STATE,
219  Result::MODULE_NN_PIA,
220  DESCRIPTION_ALREADY_INITIALIZED);
221 
222 /*!
223 @class nn::pia::ResultBufferShortage
224 @brief Indicates that the buffer passed as an argument is too small. Applications must be implemented to ensure this <tt>Result</tt> value is never returned.
225 */
226 PIA_DEFINE_RESULT(
228  Result::LEVEL_USAGE,
229  Result::SUMMARY_INVALID_ARGUMENT,
230  Result::MODULE_NN_PIA,
231  DESCRIPTION_BUFFER_SHORTAGE);
232 
233 /*!
234 @class nn::pia::ResultBrokenData
235 @brief Indicates that data coming in through the communication line is corrupted or may have been tampered with.
236 */
237 PIA_DEFINE_RESULT(
239  Result::LEVEL_PERMANENT,
240  Result::SUMMARY_INTERNAL,
241  Result::MODULE_NN_PIA,
242  DESCRIPTION_BROKEN_DATA);
243 
244 /*!
245 @class nn::pia::ResultCancelled
246 @brief Indicates that the asynchronous process received a cancellation request.
247 */
248 PIA_DEFINE_RESULT(
250  Result::LEVEL_PERMANENT,
251  Result::SUMMARY_CANCELLED,
252  Result::MODULE_NN_PIA,
253  DESCRIPTION_CANCELLED);
254 
255 /*!
256 @class nn::pia::ResultNetworkConnectionIsLost
257 @brief Indicates that the connection was already terminated.
258 */
259 PIA_DEFINE_RESULT(
261  Result::LEVEL_PERMANENT,
262  Result::SUMMARY_INVALID_STATE,
263  Result::MODULE_NN_PIA,
264  DESCRIPTION_NETWORK_CONNECTION_IS_LOST);
265 
266 /*!
267 @class nn::pia::ResultInvalidArgument
268 @brief Indicates that an invalid argument was passed to an API function. One case where this result would be returned is when a NULL pointer was passed to a function. Applications must be implemented to ensure this <tt>Result</tt> value is never returned.
269 */
270 PIA_DEFINE_RESULT(
272  Result::LEVEL_USAGE,
273  Result::SUMMARY_INVALID_ARGUMENT,
274  Result::MODULE_NN_PIA,
275  DESCRIPTION_INVALID_ARGUMENT);
276 
277 
278 /*!
279 @class nn::pia::ResultInvalidState
280 @brief Indicates that the API function was called at the wrong time. Indicates that the Pia library was not in the correct state to call the function that returned this <tt>Result</tt> value.
281 */
282 PIA_DEFINE_RESULT(
284  Result::LEVEL_USAGE,
285  Result::SUMMARY_INVALID_STATE,
286  Result::MODULE_NN_PIA,
287  DESCRIPTION_INVALID_STATE);
288 
289 /*!
290 @class nn::pia::ResultNoData
291 @brief Indicates that the data was not found.
292 */
293 PIA_DEFINE_RESULT(
294  ResultNoData,
295  Result::LEVEL_TEMPORARY,
296  Result::SUMMARY_INTERNAL,
297  Result::MODULE_NN_PIA,
298  DESCRIPTION_NO_DATA);
299 
300 /*!
301 @class nn::pia::ResultNotFound
302 @brief Indicates that the requested item was not found.
303 */
304 PIA_DEFINE_RESULT(
306  Result::LEVEL_PERMANENT,
307  Result::SUMMARY_NOT_FOUND,
308  Result::MODULE_NN_PIA,
309  DESCRIPTION_NOT_FOUND);
310 
311 /*!
312 @class nn::pia::ResultNotImplemented
313 @brief Indicates that a feature is not implemented. Applications must be implemented to ensure this <tt>Result</tt> value is never returned.
314 */
315 PIA_DEFINE_RESULT(
317  Result::LEVEL_USAGE,
318  Result::SUMMARY_INTERNAL,
319  Result::MODULE_NN_PIA,
320  DESCRIPTION_NOT_IMPLEMENTED);
321 
322 
323 /*!
324 @class nn::pia::ResultNotInitialized
325 @brief Indicates that the object or module that called the function is not initialized. Applications must be implemented to ensure this <tt>Result</tt> value is never returned.
326 */
327 PIA_DEFINE_RESULT(
329  Result::LEVEL_USAGE,
330  Result::SUMMARY_INVALID_STATE,
331  Result::MODULE_NN_PIA,
332  DESCRIPTION_NOT_INITIALIZED);
333 
334 /*!
335 @class nn::pia::ResultBufferIsFull
336 @brief Indicates that the action failed because the buffer required for the action was temporarily full. This may be caused by network congestion. It may succeed if you try again after some time has passed.
337 */
338 PIA_DEFINE_RESULT(
340  Result::LEVEL_PERMANENT,
341  Result::SUMMARY_OUT_OF_RESOURCE,
342  Result::MODULE_NN_PIA,
343  DESCRIPTION_BUFFER_IS_FULL);
344 
345 /*!
346 @class nn::pia::ResultTimeOut
347 @brief Indicates that an asynchronous process timed out.
348 */
349 PIA_DEFINE_RESULT(
351  Result::LEVEL_PERMANENT,
352  Result::SUMMARY_STATUS_CHANGED,
353  Result::MODULE_NN_PIA,
354  DESCRIPTION_TIME_OUT);
355 
356 /*!
357 @class nn::pia::ResultAlreadyExists
358 @brief Indicates that the object already exists.
359 */
360 PIA_DEFINE_RESULT(
362  Result::LEVEL_PERMANENT,
363  Result::SUMMARY_INVALID_STATE,
364  Result::MODULE_NN_PIA,
365  DESCRIPTION_ALREADY_EXISTS);
366 
367 /*!
368 @class nn::pia::ResultContainerIsFull
369 @brief Indicates that the container is full.
370 */
371 PIA_DEFINE_RESULT(
373  Result::LEVEL_PERMANENT,
374  Result::SUMMARY_INVALID_STATE,
375  Result::MODULE_NN_PIA,
376  DESCRIPTION_CONTAINER_IS_FULL);
377 
378 /*!
379 @class nn::pia::ResultTemporaryUnavailable
380 @brief Result code that indicates that the API is temporarily unusable.
381 */
382 PIA_DEFINE_RESULT(
384  Result::LEVEL_TEMPORARY,
385  Result::SUMMARY_INVALID_STATE,
386  Result::MODULE_NN_PIA,
387  DESCRIPTION_TEMPORARY_UNAVAILABLE);
388 
389 /*!
390 @class nn::pia::ResultInProgress
391 @brief Result code indicating that the specified process is already in progress.
392 */
393 PIA_DEFINE_RESULT(
395  Result::LEVEL_STATUS,
396  Result::SUMMARY_INVALID_STATE,
397  Result::MODULE_NN_PIA,
398  DESCRIPTION_IN_PROGRESS);
399 
400 /*!
401 @class nn::pia::ResultNotSet
402 @brief Result code indicating that values that are supposed to be set in advance are not set.
403 */
404 PIA_DEFINE_RESULT(
405  ResultNotSet,
406  Result::LEVEL_PERMANENT,
407  Result::SUMMARY_INVALID_STATE,
408  Result::MODULE_NN_PIA,
409  DESCRIPTION_NOT_SET);
410 
411 
412 /*!
413 @class nn::pia::ResultMemoryLeak
414 @brief Result code indicating that there may be a memory leak in the Pia library.
415 */
416 PIA_DEFINE_RESULT(
418  Result::LEVEL_USAGE,
419  Result::SUMMARY_INTERNAL,
420  Result::MODULE_NN_PIA,
421  DESCRIPTION_MEMORY_LEAK);
422 
423 
424 /*!
425 @class nn::pia::ResultNotFoundNetwork
426 @brief Indicates that the network was not found.
427 */
428 PIA_DEFINE_RESULT(
430  Result::LEVEL_TEMPORARY,
431  Result::SUMMARY_NOT_FOUND,
432  Result::MODULE_NN_PIA,
433  DESCRIPTION_NOT_FOUND_NETWORK);
434 
435 /*!
436 @class nn::pia::ResultInvalidNode
437 @brief Indicates that the node being sent to could not be found on the network.
438 */
439 PIA_DEFINE_RESULT(
441  Result::LEVEL_PERMANENT,
442  Result::SUMMARY_NOT_FOUND,
443  Result::MODULE_NN_PIA,
444  DESCRIPTION_INVALID_NODE);
445 
446 /*!
447 @class nn::pia::ResultNothingPacket
448 @brief Indicates that packets expected to be received could not be found.
449 */
450 PIA_DEFINE_RESULT(
452  Result::LEVEL_TEMPORARY,
453  Result::SUMMARY_NOT_FOUND,
454  Result::MODULE_NN_PIA,
455  DESCRIPTION_NOTHING_PACKET);
456 
457 /*!
458 @class nn::pia::ResultNegligibleFault
459 @brief Indicates an error that can be ignored.
460 */
461 PIA_DEFINE_RESULT(
463  Result::LEVEL_TEMPORARY,
464  Result::SUMMARY_INVALID_STATE,
465  Result::MODULE_NN_PIA,
466  DESCRIPTION_NEGLIGIBLE_FAULT);
467 
468 /*!
469 @class nn::pia::ResultInvalidConnection
470 @brief Indicates that the connection state is invalid or that wireless mode is off.
471 */
472 PIA_DEFINE_RESULT(
474  Result::LEVEL_PERMANENT,
475  Result::SUMMARY_INVALID_STATE,
476  Result::MODULE_NN_PIA,
477  DESCRIPTION_INVALID_CONNECTION);
478 
479 /*!
480 @class nn::pia::ResultHostMigrationFailure
481 @brief Indicates that local network host migration failed.
482 Hosts leaving the network must be handled appropriately or communication cannot continue.
483 */
484 PIA_DEFINE_RESULT(
486  Result::LEVEL_PERMANENT,
487  Result::SUMMARY_STATUS_CHANGED,
488  Result::MODULE_NN_PIA,
489  DESCRIPTION_HOST_MIGRATION_FAILURE);
490 
491 /*!
492 @class nn::pia::ResultDifferentVersion
493 @brief Indicates that the local network version or the application version of the target network is different from that of the local station.
494 */
495 PIA_DEFINE_RESULT(
497  Result::LEVEL_PERMANENT,
498  Result::SUMMARY_INVALID_STATE,
499  Result::MODULE_NN_PIA,
500  DESCRIPTION_DIFFERENT_VERSION);
501 
502 /*!
503 @class nn::pia::ResultErrorOccurred
504 @brief Indicates that an internal error occurred.
505 */
506 PIA_DEFINE_RESULT(
508  Result::LEVEL_PERMANENT,
509  Result::SUMMARY_INVALID_STATE,
510  Result::MODULE_NN_PIA,
511  DESCRIPTION_ERROR_OCCURRED);
512 
513 /*!
514 @class nn::pia::ResultInvalidNetwork
515 @brief Indicates that a the system cannot connect to this network.
516 */
517 PIA_DEFINE_RESULT(
519  Result::LEVEL_PERMANENT,
520  Result::SUMMARY_INVALID_STATE,
521  Result::MODULE_NN_PIA,
522  DESCRIPTION_INVALID_NETWORK);
523 
524 /*!
525 @class nn::pia::ResultNetworkIsFull
526 @brief The network is full.
527 */
528 PIA_DEFINE_RESULT(
530  Result::LEVEL_PERMANENT,
531  Result::SUMMARY_INVALID_STATE,
532  Result::MODULE_NN_PIA,
533  DESCRIPTION_NETWORK_IS_FULL);
534 
535 
536 /*!
537 @class nn::pia::ResultConnectionFailed
538 @brief Indicates that connecting to the network failed for some reason. (System error.)
539 This result never gets back to the application.
540 */
541 PIA_DEFINE_RESULT(
543  Result::LEVEL_PERMANENT,
544  Result::SUMMARY_INTERNAL,
545  Result::MODULE_NN_PIA,
546  DESCRIPTION_CONNECTION_FAILED);
547 
548 
549 /*!
550 @class nn::pia::ResultCreateStationFailed
551 @brief Indicates that the new <tt>Station</tt> could not be created. (System error.)
552 This result never gets back to the application.
553 */
554 PIA_DEFINE_RESULT(
556  Result::LEVEL_PERMANENT,
557  Result::SUMMARY_INTERNAL,
558  Result::MODULE_NN_PIA,
559  DESCRIPTION_CREATE_STATION_FAILED);
560 
561 
562 /*!
563 @class nn::pia::ResultIncompatibleFormat
564 @brief Represents incompatible formats.
565 */
566 PIA_DEFINE_RESULT(
568  Result::LEVEL_PERMANENT,
569  Result::SUMMARY_INVALID_STATE,
570  Result::MODULE_NN_PIA,
571  DESCRIPTION_VERSION_MISMATCHED);
572 
573 /*!
574 @class nn::pia::ResultNotInCommunication
575 @brief Not currently in communication.
576 */
577 PIA_DEFINE_RESULT(
579  Result::LEVEL_PERMANENT,
580  Result::SUMMARY_INVALID_STATE,
581  Result::MODULE_NN_PIA,
582  DESCRIPTION_IS_NOT_IN_COMMUNICATION);
583 
584 /*!
585 @class nn::pia::ResultTableIsFull
586 @brief Indicates that no more entries can be added because the table is full. (System error.)
587 This result never gets back to the application.
588 */
589 PIA_DEFINE_RESULT(
591  Result::LEVEL_PERMANENT,
592  Result::SUMMARY_INVALID_STATE,
593  Result::MODULE_NN_PIA,
594  DESCRIPTION_TABLE_IS_FULL);
595 
596 
597 /*!
598 @class nn::pia::ResultDataIsNotArrivedYet
599 @brief Data has not yet arrived from all stations.
600 
601 @details This error is generated when a problem occurs in data synchronization, because of a degenerated communication state, for example.
602 If the function returns this error, have the application stop the progress of the game and wait for the next picture frame.
603 Note that this error is not necessarily encountered by all stations at the same time, or for the same number of times.
604 */
605 PIA_DEFINE_RESULT(
607  Result::LEVEL_PERMANENT,
608  Result::SUMMARY_NOTHING_HAPPENED,
609  Result::MODULE_NN_PIA,
610  DESCRIPTION_SYNC_DATA_IS_NOT_ARRIVED_YET);
611 
612 
613 /*!
614 @class nn::pia::ResultDataIsNotSet
615 @brief The data to send has not been specified.
616 */
617 PIA_DEFINE_RESULT(
619  Result::LEVEL_PERMANENT,
620  Result::SUMMARY_NOTHING_HAPPENED,
621  Result::MODULE_NN_PIA,
622  DESCRIPTION_SYNC_DATA_IS_NOT_SET);
623 
624 
625 /*!
626 @class nn::pia::ResultNatCheckFailed
627 @brief Indicates that the NAT check failed.
628 */
629 PIA_DEFINE_RESULT(
631  Result::LEVEL_PERMANENT,
632  Result::SUMMARY_INVALID_STATE,
633  Result::MODULE_NN_PIA,
634  DESCRIPTION_NAT_CHECK_FAILED);
635 
636 /*!
637 @cond PRIVATE
638 @class nn::pia::ResultInUse
639 @brief Indicates that the object is already being used.
640 */
641 PIA_DEFINE_RESULT(
642  ResultInUse,
643  Result::LEVEL_PERMANENT,
644  Result::SUMMARY_INVALID_STATE,
645  Result::MODULE_NN_PIA,
646  DESCRIPTION_IN_USED);
647 //!@endcond
648 
649 
650 /*!
651 @class nn::pia::ResultDnsFailed
652 @brief Indicates that DNS resolution failed.
653 */
654 PIA_DEFINE_RESULT(
656  Result::LEVEL_PERMANENT,
657  Result::SUMMARY_INVALID_STATE,
658  Result::MODULE_NN_PIA,
659  DESCRIPTION_DNS_FAILED);
660 
661 
662 /*!
663 @class nn::pia::ResultNexInternalError
664 @brief Indicates that an error occurred in NEX.
665 */
666 PIA_DEFINE_RESULT(
668  Result::LEVEL_FATAL,
669  Result::SUMMARY_INVALID_STATE,
670  Result::MODULE_NN_PIA,
671  DESCRIPTION_NEX_INTERNAL_ERROR);
672 
673 
674 /*!
675 @class nn::pia::ResultJoinRequestDenied
676 @brief The join request was rejected by the session host.
677 */
678 PIA_DEFINE_RESULT(
680  Result::LEVEL_PERMANENT,
681  Result::SUMMARY_INVALID_STATE,
682  Result::MODULE_NN_PIA,
683  DESCRIPTION_REQUEST_DENIED);
684 
685 
686 /*!
687 @class nn::pia::ResultStationConnectionFailed
688 @brief Failed to connect stations.
689 */
690 PIA_DEFINE_RESULT(
692  Result::LEVEL_PERMANENT,
693  Result::SUMMARY_INVALID_STATE,
694  Result::MODULE_NN_PIA,
695  DESCRIPTION_STATION_CONNECTION_FAILED);
696 
697 
698 /*!
699 @class nn::pia::ResultMessageNotHandled
700 @brief Could not process the received <tt>ProtocolMessageOld</tt> object.
701 */
702 PIA_DEFINE_RESULT(
704  Result::LEVEL_PERMANENT,
705  Result::SUMMARY_INVALID_STATE,
706  Result::MODULE_NN_PIA,
707  DESCRIPTION_MESSAGE_NOT_HANDLED);
708 
709 
710 /*!
711 @class nn::pia::ResultFailedCreateProtocol
712 @brief Failed to generate the system protocol.
713 */
714 PIA_DEFINE_RESULT(
716  Result::LEVEL_PERMANENT,
717  Result::SUMMARY_INVALID_STATE,
718  Result::MODULE_NN_PIA,
719  DESCRIPTION_FAILED_CREATE_PROTOCOL);
720 
721 
722 /*!
723 @class nn::pia::ResultFailedStartupProtocol
724 @brief Failed to start the system protocol.
725 */
726 PIA_DEFINE_RESULT(
728  Result::LEVEL_PERMANENT,
729  Result::SUMMARY_INVALID_STATE,
730  Result::MODULE_NN_PIA,
731  DESCRIPTION_FAILED_STARTUP_PROTOCOL);
732 
733 
734 /*!
735 @class nn::pia::ResultMeshIsFull
736 @brief Could not join the requested mesh because it was full.
737 */
738 PIA_DEFINE_RESULT(
740  Result::LEVEL_PERMANENT,
741  Result::SUMMARY_INVALID_STATE,
742  Result::MODULE_NN_PIA,
743  DESCRIPTION_MESH_IS_FULL);
744 
745 
746 /*!
747 @class nn::pia::ResultInvalidSystemMessage
748 @brief An invalid message was returned as a response to a join request.
749 */
750 PIA_DEFINE_RESULT(
752  Result::LEVEL_PERMANENT,
753  Result::SUMMARY_INVALID_STATE,
754  Result::MODULE_NN_PIA,
755  DESCRIPTION_INVALID_MESSAGE);
756 
757 /*!
758 @class nn::pia::ResultStationConnectionNatTraversalFailedUnknown
759 @brief NAT traversal between stations failed. The NAT type is unknown.
760 */
761 PIA_DEFINE_RESULT(
763  Result::LEVEL_PERMANENT,
764  Result::SUMMARY_INVALID_STATE,
765  Result::MODULE_NN_PIA,
766  DESCRIPTION_CONNECTION_NAT_TRAVERSAL_FAILED_UNKNOWN);
767 
768 /*!
769 @class nn::pia::ResultStationConnectionNatTraversalFailedEim
770 @brief NAT traversal between stations failed. The NAT type is <tt>EIM</tt>. (Removed.)
771 */
772 PIA_DEFINE_RESULT(
774  Result::LEVEL_PERMANENT,
775  Result::SUMMARY_INVALID_STATE,
776  Result::MODULE_NN_PIA,
777  DESCRIPTION_CONNECTION_NAT_TRAVERSAL_FAILED_EIM);
778 
779 /*!
780 @class nn::pia::ResultStationConnectionNatTraversalFailedEdm
781 @brief NAT traversal between stations failed. The NAT type is <tt>EDM</tt>. (Removed.)
782 */
783 PIA_DEFINE_RESULT(
785  Result::LEVEL_PERMANENT,
786  Result::SUMMARY_INVALID_STATE,
787  Result::MODULE_NN_PIA,
788  DESCRIPTION_CONNECTION_NAT_TRAVERSAL_FAILED_EDM);
789 
790 /*!
791 @class nn::pia::ResultNatTraversalFailedBothEim
792 @brief NAT traversal between stations failed. The NAT type for both local and remote stations is EIM.
793 */
794 PIA_DEFINE_RESULT(
796  Result::LEVEL_PERMANENT,
797  Result::SUMMARY_INVALID_STATE,
798  Result::MODULE_NN_PIA,
799  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EIM_REMOTE_EIM);
800 
801 /*!
802 @class nn::pia::ResultNatTraversalFailedLocalEimRemoteEdm
803 @brief NAT traversal between stations failed. The NAT type was EIM for the local station and EDM for the remote station.
804 */
805 PIA_DEFINE_RESULT(
807  Result::LEVEL_PERMANENT,
808  Result::SUMMARY_INVALID_STATE,
809  Result::MODULE_NN_PIA,
810  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EIM_REMOTE_EDM);
811 
812 /*!
813 @class nn::pia::ResultNatTraversalFailedLocalEdmRemoteEim
814 @brief NAT traversal between stations failed. The NAT type was EDM for the local station and EIM for the remote station.
815 */
816 PIA_DEFINE_RESULT(
818  Result::LEVEL_PERMANENT,
819  Result::SUMMARY_INVALID_STATE,
820  Result::MODULE_NN_PIA,
821  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EDM_REMOTE_EIM);
822 
823 /*!
824 @class nn::pia::ResultNatTraversalFailedBothEdm
825 @brief NAT traversal between stations failed. The NAT type for both local and remote stations is EDM.
826 */
827 PIA_DEFINE_RESULT(
829  Result::LEVEL_PERMANENT,
830  Result::SUMMARY_INVALID_STATE,
831  Result::MODULE_NN_PIA,
832  DESCRIPTION_NAT_TRAVERSAL_FAILED_LOCAL_EDM_REMOTE_EDM);
833 
834 
835 /*!
836 @class nn::pia::ResultRelayFailedNoCandidate
837 @brief The relay connection failed. (There was no relay candidate.)
838 */
839 PIA_DEFINE_RESULT(
841  Result::LEVEL_PERMANENT,
842  Result::SUMMARY_INVALID_STATE,
843  Result::MODULE_NN_PIA,
844  DESCRIPTION_RELAY_FAILED_NO_CANDIDATE);
845 
846 /*!
847 @class nn::pia::ResultRelayFailedRttLimit
848 @brief The relay connection failed. (The RTT limit was exceeded.)
849 */
850 PIA_DEFINE_RESULT(
852  Result::LEVEL_PERMANENT,
853  Result::SUMMARY_INVALID_STATE,
854  Result::MODULE_NN_PIA,
855  DESCRIPTION_RELAY_FAILED_RTT_LIMIT);
856 /*!
857 @class nn::pia::ResultRelayFailedRelayNumLimit
858 @brief The relay connection failed. (The limit on the number of relays was exceeded.)
859 */
860 PIA_DEFINE_RESULT(
862  Result::LEVEL_PERMANENT,
863  Result::SUMMARY_INVALID_STATE,
864  Result::MODULE_NN_PIA,
865  DESCRIPTION_RELAY_FAILED_RELAY_NUM_LIMIT);
866 /*!
867 @class nn::pia::ResultRelayFailedUnknown
868 @brief The relay connection failed. (Details unknown.)
869 */
870 PIA_DEFINE_RESULT(
872  Result::LEVEL_PERMANENT,
873  Result::SUMMARY_INVALID_STATE,
874  Result::MODULE_NN_PIA,
875  DESCRIPTION_RELAY_FAILED_UNKNOWN);
876 
877 /*!
878 @class nn::pia::ResultNatTraversalRequestTimeout
879 @brief NAT traversal between stations failed. The NAT traversal request timed out.
880 */
881 PIA_DEFINE_RESULT(
883  Result::LEVEL_PERMANENT,
884  Result::SUMMARY_INVALID_STATE,
885  Result::MODULE_NN_PIA,
886  DESCRIPTION_NAT_TRAVERSAL_REQUEST_TIMEOUT);
887 
888 /*!
889 @class nn::pia::ResultSessionIsNotFound
890 @brief The session no longer exists.
891 */
892 PIA_DEFINE_RESULT(
894  Result::LEVEL_PERMANENT,
895  Result::SUMMARY_INVALID_STATE,
896  Result::MODULE_NN_PIA,
897  DESCRIPTION_SESSION_IS_NOT_FOUND);
898 
899 /*!
900 @class nn::pia::ResultMatchmakeSessionIsFull
901 @brief Attempted to join a matchmaking session that is full.
902 */
903 PIA_DEFINE_RESULT(
905  Result::LEVEL_PERMANENT,
906  Result::SUMMARY_INVALID_STATE,
907  Result::MODULE_NN_PIA,
908  DESCRIPTION_MATCHMAKE_SESSION_IS_FULL);
909 
910 /*!
911 @class nn::pia::ResultDeniedByParticipants
912 @brief The local station is blacklisted by a user in the session.
913 */
914 PIA_DEFINE_RESULT(
916  Result::LEVEL_PERMANENT,
917  Result::SUMMARY_INVALID_STATE,
918  Result::MODULE_NN_PIA,
919  DESCRIPTION_DENIED_BY_PARTICIPANTS);
920 
921 /*!
922 @class nn::pia::ResultParticipantInBlackList
923 @brief A user on the local station's blacklist is in the session.
924 */
925 PIA_DEFINE_RESULT(
927  Result::LEVEL_PERMANENT,
928  Result::SUMMARY_INVALID_STATE,
929  Result::MODULE_NN_PIA,
930  DESCRIPTION_PARTICIPANT_IN_BLACKLIST);
931 
932 /*!
933 @class nn::pia::ResultGameServerMaintenance
934 @brief The game server is down for maintenance.
935 */
936 PIA_DEFINE_RESULT(
938  Result::LEVEL_PERMANENT,
939  Result::SUMMARY_INVALID_STATE,
940  Result::MODULE_NN_PIA,
941  DESCRIPTION_GAME_SERVER_MAINTENANCE);
942 
943 /*!
944 @class nn::pia::ResultSessionUserPasswordUnmatch
945 @brief Attempted to join a session set with a user password, but the user password did not match.
946 */
947 PIA_DEFINE_RESULT(
949  Result::LEVEL_PERMANENT,
950  Result::SUMMARY_INVALID_STATE,
951  Result::MODULE_NN_PIA,
952  DESCRIPTION_SESSION_USER_PASSWORD_UNMATCH);
953 
954 /*!
955 @class nn::pia::ResultSessionSystemPasswordUnmatch
956 @brief Attempted to join a session set with a system password, but the system password did not match.
957 */
958 PIA_DEFINE_RESULT(
960  Result::LEVEL_PERMANENT,
961  Result::SUMMARY_INVALID_STATE,
962  Result::MODULE_NN_PIA,
963  DESCRIPTION_SESSION_SYSTEM_PASSWORD_UNMATCH);
964 
965 /*!
966 @class nn::pia::ResultMeshConnectionIsLost
967 @brief The mesh is disconnected.
968 */
969 PIA_DEFINE_RESULT(
971  Result::LEVEL_PERMANENT,
972  Result::SUMMARY_INVALID_STATE,
973  Result::MODULE_NN_PIA,
974  DESCRIPTION_MESH_CONNECTION_IS_LOST);
975 
976 /*!
977 @class nn::pia::ResultSessionIsClosed
978 @brief Attempted to join a session that is closed.
979 */
980 PIA_DEFINE_RESULT(
982  Result::LEVEL_PERMANENT,
983  Result::SUMMARY_INVALID_STATE,
984  Result::MODULE_NN_PIA,
985  DESCRIPTION_SESSION_IS_CLOSED);
986 
987 /*!
988 @class nn::pia::ResultCompanionStationIsOffline
989 @brief (For joint sessions) Attempted to add a station that was not logged in to the server.
990 */
991 PIA_DEFINE_RESULT(
993  Result::LEVEL_PERMANENT,
994  Result::SUMMARY_INVALID_STATE,
995  Result::MODULE_NN_PIA,
996  DESCRIPTION_COMPANION_STATION_IS_OFFLINE);
997 
998 /*!
999 @class nn::pia::ResultHostIsNotFriend
1000 @brief Attempted to join a session with a host that is not a friend.
1001 */
1002 PIA_DEFINE_RESULT(
1004  Result::LEVEL_PERMANENT,
1005  Result::SUMMARY_INVALID_STATE,
1006  Result::MODULE_NN_PIA,
1007  DESCRIPTION_HOST_IS_NOT_FRIEND);
1008 
1009 
1010 /*!
1011 @class nn::pia::ResultSessionConnectionIsLost
1012 @brief The session was disconnected.
1013 */
1014 PIA_DEFINE_RESULT(
1016  Result::LEVEL_PERMANENT,
1017  Result::SUMMARY_INVALID_STATE,
1018  Result::MODULE_NN_PIA,
1019  DESCRIPTION_SESSION_CONNECTION_IS_LOST);
1020 
1021 /*!
1022 @class nn::pia::ResultCompanionStationIsLeft
1023 @brief Attempted to specify companion stations for the joint session that were disconnected.
1024 */
1025 PIA_DEFINE_RESULT(
1027  Result::LEVEL_PERMANENT,
1028  Result::SUMMARY_INVALID_STATE,
1029  Result::MODULE_NN_PIA,
1030  DESCRIPTION_COMPANION_STATION_IS_LEFT);
1031 
1032 /*!
1033 @class nn::pia::ResultCompanionStationDenied
1034 @brief Attempted to specify companion stations for the joint session that rejected join-in.
1035 */
1036 PIA_DEFINE_RESULT(
1038  Result::LEVEL_PERMANENT,
1039  Result::SUMMARY_INVALID_STATE,
1040  Result::MODULE_NN_PIA,
1041  DESCRIPTION_COMPANION_STATION_DENIED);
1042 
1043 /*!
1044 @class nn::pia::ResultSessionMigrationFailed
1045 @brief Processes failed that were necessary for session transitions in joint sessions.
1046 */
1047 PIA_DEFINE_RESULT(
1049  Result::LEVEL_PERMANENT,
1050  Result::SUMMARY_INVALID_STATE,
1051  Result::MODULE_NN_PIA,
1052  DESCRIPTION_SESSION_MIGRATION_FAILED);
1053 
1054 /*!
1055 @class nn::pia::ResultGameServerProcessAborted
1056 @brief The game server process aborted.
1057 */
1058 PIA_DEFINE_RESULT(
1060  Result::LEVEL_PERMANENT,
1061  Result::SUMMARY_INVALID_STATE,
1062  Result::MODULE_NN_PIA,
1063  DESCRIPTION_GAME_SERVER_PROCESS_ABORTED);
1064 
1065 /*!
1066 @class nn::pia::ResultSessionWrongState
1067 @brief The state of the joined session was irregular.
1068 */
1069 PIA_DEFINE_RESULT(
1071  Result::LEVEL_PERMANENT,
1072  Result::SUMMARY_INVALID_STATE,
1073  Result::MODULE_NN_PIA,
1074  DESCRIPTION_SESSION_WRONG_STATE);
1075 
1076 /*!
1077 @class nn::pia::ResultSessionInvalidState
1078 @brief The <tt>Session</tt> API is being called in the wrong way.
1079 */
1080 PIA_DEFINE_RESULT(
1082  Result::LEVEL_PERMANENT,
1083  Result::SUMMARY_INVALID_STATE,
1084  Result::MODULE_NN_PIA,
1085  DESCRIPTION_SESSION_INVALID_STATE);
1086 
1087 
1088 /*!
1089 @class nn::pia::ResultSessionInconsistentState
1090 @brief There is an inconsistent state in the session.
1091 */
1092 PIA_DEFINE_RESULT(
1094  Result::LEVEL_PERMANENT,
1095  Result::SUMMARY_INVALID_STATE,
1096  Result::MODULE_NN_PIA,
1097  DESCRIPTION_SESSION_INCONSISTENT_STATE);
1098 
1099 /*!
1100 @class nn::pia::ResultInvalidTiming
1101 @brief Indicates that the action could not execute because of a timing problem.
1102 */
1103 PIA_DEFINE_RESULT(
1105  Result::LEVEL_PERMANENT,
1106  Result::SUMMARY_INVALID_STATE,
1107  Result::MODULE_NN_PIA,
1108  DESCRIPTION_INVALID_TIMING);
1109 
1110 
1111 #define PIA_RETURN_RESULT(result) \
1112  { \
1113  PIA_ASSERTMSG(result::IsAssertEnable() == false, "Result:" #result); \
1114  return result(); \
1115  }
1116 }
1117 } // end of namespace nn::pia
Represents a PiaClone Result value.
Definition: result.h:68
The network is full.
The maximum value. The application is not required to use this value.
Definition: result.h:72
Result code indicating that the specified process is already in progress.
Attempted to join a session set with a system password, but the system password did not match...
Represents a PiaInet Result value.
Definition: result.h:62
Represents a PiaLocal Result value.
Definition: result.h:59
An invalid message was returned as a response to a join request.
Represents a PiaUtil Result value.
Definition: result.h:64
Attempted to specify companion stations for the joint session that rejected join-in.
A user on the local station&#39;s blacklist is in the session.
Represents a PiaBrain Result value.
Definition: result.h:70
The relay connection failed. (There was no relay candidate.)
Indicates that the connection state is invalid or that wireless mode is off.
Indicates that a Pia module is not the source.
Definition: result.h:71
The state of the joined session was irregular.
Failed to start the system protocol.
Failed to generate the system protocol.
Represents incompatible formats.
Indicates that the object already exists.
Indicates that the container is full.
Definition: assert.h:115
NAT traversal between stations failed. The NAT type for both local and remote stations is EIM...
Indicates that the local network version or the application version of the target network is differen...
Indicates that initialization is already complete. Applications must be implemented to ensure this Re...
Represents a PiaSession Result value.
Definition: result.h:63
The game server process aborted.
Indicates that an asynchronous process timed out.
Result code that indicates that the API is temporarily unusable.
Indicates that data coming in through the communication line is corrupted or may have been tampered w...
Could not join the requested mesh because it was full.
(For joint sessions) Attempted to add a station that was not logged in to the server.
Data has not yet arrived from all stations.
NAT traversal between stations failed. The NAT type is unknown.
Indicates that an error occurred in NEX.
The relay connection failed. (The limit on the number of relays was exceeded.)
The Session API is being called in the wrong way.
Indicates that the requested item was not found.
Result code indicating that there may be a memory leak in the Pia library.
Indicates that the connection was already terminated.
Indicates that the network was not found.
Could not process the received ProtocolMessageOld object.
ModuleType
Enumerates modules in the Pia library. You get one of these values when you pass a nn::Result value t...
Definition: result.h:54
The session was disconnected.
Indicates that DNS resolution failed.
Indicates that the buffer passed as an argument is too small. Applications must be implemented to ens...
The data to send has not been specified.
Indicates that the node being sent to could not be found on the network.
NAT traversal between stations failed. The NAT type was EDM for the local station and EIM for the rem...
Indicates that an invalid argument was passed to an API function. One case where this result would be...
Indicates that packets expected to be received could not be found.
The relay connection failed. (The RTT limit was exceeded.)
Not currently in communication.
Indicates an error that can be ignored.
The relay connection failed. (Details unknown.)
The local station is blacklisted by a user in the session.
Indicates that connecting to the network failed for some reason. (System error.) This result never ge...
NAT traversal between stations failed. The NAT type for both local and remote stations is EDM...
Indicates that the new Station could not be created. (System error.) This result never gets back to t...
Attempted to join a session that is closed.
Attempted to specify companion stations for the joint session that were disconnected.
The join request was rejected by the session host.
Attempted to join a matchmaking session that is full.
Indicates that an internal error occurred.
Reserved value. The GetModuleTypeFromResult function never returns this value.
Definition: result.h:56
Represents a PiaTransport Result value.
Definition: result.h:60
Represents a PiaChat Result value.
Definition: result.h:67
Indicates that no more entries can be added because the table is full. (System error.) This result never gets back to the application.
Indicates that the action could not execute because of a timing problem.
Represents a PiaSync Result value.
Definition: result.h:61
NAT traversal between stations failed. The NAT traversal request timed out.
NAT traversal between stations failed. The NAT type is EDM. (Removed.)
Processes failed that were necessary for session transitions in joint sessions.
Represents a PiaReckonng Result value.
Definition: result.h:69
Attempted to join a session with a host that is not a friend.
There is an inconsistent state in the session.
Result code indicating that values that are supposed to be set in advance are not set...
Attempted to join a session set with a user password, but the user password did not match...
Indicates that the action failed because the buffer required for the action was temporarily full...
Represents a PiaCommon Result value.
Definition: result.h:58
Failed to connect stations.
The session no longer exists.
Represents a PiaService Result value.
Definition: result.h:65
NAT traversal between stations failed. The NAT type was EIM for the local station and EDM for the rem...
Represents a generic Result value.
Definition: result.h:57
The game server is down for maintenance.
Indicates that the data was not found.
Indicates that the asynchronous process received a cancellation request.
NAT traversal between stations failed. The NAT type is EIM. (Removed.)
Indicates a failure to allocate memory or other resources. Applications must be implemented to ensure...
Represents a PiaDB Result value.
Definition: result.h:66
Indicates that the object or module that called the function is not initialized. Applications must be...
Indicates that the NAT check failed.
Indicates that the API function was called at the wrong time. Indicates that the Pia library was not ...
Indicates that a the system cannot connect to this network.
The mesh is disconnected.
Indicates that a feature is not implemented. Applications must be implemented to ensure this Result v...
Indicates that local network host migration failed. Hosts leaving the network must be handled appropr...