1 /*---------------------------------------------------------------------------*
2
3 Project: OLV
4 File: olv_Api.h
5
6 Copyright (C) Nintendo. All rights reserved.
7
8 These coded instructions, statements, and computer programs contain
9 proprietary information of Nintendo of America Inc. and/or Nintendo
10 Company Ltd., and are protected by Federal copyright law. They may
11 not be disclosed to third parties or copied or duplicated in any form,
12 in whole or in part, without the prior written consent of Nintendo.
13
14 *---------------------------------------------------------------------------*/
15 //------------------------------------------------------------------------------
16 /** @file olv_Api.h
17 *
18 * @brief The main header for the OLV library.
19 *
20 */
21 //------------------------------------------------------------------------------
22
23 // -----------------------------------------------------------------------------
24 // standard header here
25 // -----------------------------------------------------------------------------
26
27 #ifndef __OLV_API_H_
28 #define __OLV_API_H_
29
30 /// nn
31 namespace nn {
32
33 /// olv
34 namespace olv {
35
36 /** @defgroup function Static Functions
37 * @{
38 */
39
40 //------------------------------------------------------------------------------
41 /**
42 * Initialization.
43 *
44 * Initializes the Olive library (OLV).
45 * Call this function before using the Olive library.
46 *
47 * If this function is called with <tt>nn::olv::InitializeParam</tt> specified in its default state, the library is initialized in online mode.
48 * If this function is called with <tt>@ref nn::olv::InitializeParam::FLAG_OFFLINE_MODE</tt> specified by <tt>nn::olv::InitializeParam::SetFlags</tt>, the library is initialized in offline mode.
49 * The difference between online mode and offline mode is described below.
50 *
51 * <b>Online Mode</b>
52 * @li At initialization, the service token is obtained, a connection is made to the server, and it prepares the online APIs to be available.
53 * @li If initialized in online mode, you can use all the features of the OLV library.
54 * @li When this function is called in online mode, processing is temporarily blocked so that it can search for a server to connect to.
55 * (The server stores the URLs that the OLV library needs to send and receive data.)
56 * @li The <tt>@ref nn::olv::SwitchToOnlineMode</tt> function is called if the library is initialized in online mode.
57 * @li Also refer to the errors from that function.
58 *
59 * <b>Offline Mode</b>
60 * @li Performs minimal initialization, such as initializing a work buffer, that does not require communication to be established.
61 * @li The function finishes quickly because it does not establish communication. However, API functions for use in online mode are not available.
62 * @li If the library is initialized in offline mode, you can switch to online mode at any time by calling the <tt>@ref nn::olv::SwitchToOnlineMode</tt> function.
63 *
64 * When this function is called, it also initializes other OLV modules.
65 *
66 * @param[in] param Specifies parameters used for initialization.
67 *
68 * @retval ResultSuccess Indicates success.
69 * @retval ResultInitialized Indicates that the library is already initialized.
70 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
71 * @retval ResultInitializeError Indicates that initialization failed.
72 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
73 * @retval ResultCanceled Indicates that the action was canceled.
74 * @retval ResultLibraryRestrictedByParentalControl Indicates that posting and viewing are blocked by Parental Controls.
75 * @retval ResultAcpError Indicates that the ACP function failed.
76 * @retval ResultSciError Indicates that the SCI function failed.
77 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
78 * @retval ResultHttpError Indicates an HTTP error.
79 * @retval ResultDataNotFound Indicates that the server did not return any data.
80 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
81 * @retval ResultServerError Indicates that an error occurred on the server.
82 * @retval ResultXmlParseError Indicates a failure to parse raw data.
83 * @retval ResultInternalError Indicates an internal error in the library.
84 *
85 * This function calls the following functions in the <tt>nn::act</tt> namespace.
86 * @li <tt>nn::act::Initialize</tt>
87 * @li <tt>nn::act::GetSlotNo</tt>
88 * @li <tt>nn::act::GetTransferableIdEx</tt>
89 * @li <tt>nn::act::GetTimeZoneId</tt>
90 * @li <tt>nn::act::GetUtcOffset</tt>
91 * <b>If initialized in online mode</b>
92 * @li <tt>nn::act::AcquireIndependentServiceToken</tt>
93 *
94 * All of these functions except for <tt>nn::act::GetSlotNo</tt> and <tt>nn::act::GetUtcOffset</tt> may return an error.
95 * An <tt>nn::act</tt> error is returned. For information, see the <tt>nn::act</tt> error codes.
96 *
97 * @note If the library was initialized in offline mode, this function makes an internal call to <tt>@ref nn::olv::SwitchToOnlineMode</tt>. If the function fails, the application is prohibited from automatically trying to call the function again.
98
99
100
101
102
103
104
105
106 */
107 nn::Result Initialize(const nn::olv::InitializeParam* param);
108
109 //------------------------------------------------------------------------------
110 /**
111 * Initializes the version that gets the parameters passed at the time of the application jump from the system parameters.
112 *
113 * If initialization succeeds, the information passed at the time of the application jump is stored in <tt>@ref nn::olv::MainAppParam</tt> and can be used by the application.
114 *
115 * If the parameters passed at the time of the application jump failed to be stored, the <tt>@ref nn::olv::Initialize</tt> function is called internally to perform the normal initialization process without bothering to return an error.
116 * (If this happens, values inside <tt>@ref nn::olv::MainAppParam</tt> are undefined.)
117 *
118 * The initialization process is otherwise the same as the <tt>@ref nn::olv::Initialize</tt> function. However, initialization is faster because communications does not take place, even when the library is being initialized in online mode to use the parameters passed at the time of the application jump that are necessary for communications.
119 * Also, see the description of the <tt>@ref nn::olv::Initialize</tt> function.
120 *
121 * @note You cannot call this function in offline mode.
122 * @note If this function is called in offline mode, <tt>@ref nn::olv::ResultInvalidParameter</tt> is returned.
123 *
124 * @param[out] mainAppParam Specifies the parameter storing the parameters passed at the time of the application jump.
125 * @param[in] param Specifies parameters used for initialization.
126 *
127 * @retval ResultSuccess Indicates success.
128 * @retval ResultInitialized Indicates that the library is already initialized.
129 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
130 * @retval ResultInitializeError Indicates that initialization failed.
131 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
132 * @retval ResultCanceled Indicates that the action was canceled.
133 * @retval ResultLibraryRestrictedByParentalControl Indicates that posting and viewing are blocked by Parental Controls.
134 * @retval ResultAcpError Indicates that the ACP function failed.
135 * @retval ResultSciError Indicates that the SCI function failed.
136 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
137 * @retval ResultHttpError Indicates an HTTP error.
138 * @retval ResultDataNotFound Indicates that the server did not return any data.
139 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
140 * @retval ResultServerError Indicates that an error occurred on the server.
141 * @retval ResultXmlParseError Indicates a failure to parse raw data.
142 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
143 * @retval ResultInternalError Indicates an internal error in the library.
144 *
145 * This function may call the following functions in the <tt>nn::act</tt> namespace.
146 * @li <tt>nn::act::Initialize</tt>
147 * @li <tt>nn::act::GetSlotNo</tt>
148 * @li <tt>nn::act::GetTransferableIdEx</tt>
149 * @li <tt>nn::act::GetTimeZoneId</tt>
150 * @li <tt>nn::act::GetUtcOffset</tt>
151 * @li <tt>nn::act::AcquireIndependentServiceToken</tt>
152 *
153 * All of these functions, except for <tt>nn::act::GetSlotNo</tt> and <tt>nn::act::GetUtcOffset</tt>, may return an error. In such cases, the <tt>nn::act</tt> error is returned. Refer to the <tt>nn::act</tt> error codes.
154 *
155 * @note This function makes an internal call to <tt>@ref nn::olv::SwitchToOnlineMode</tt>. If the function fails, the application is prohibited from automatically trying to call the function again.
156
157
158
159
160
161
162
163
164
165
166
167
168 */
169 nn::Result Initialize(nn::olv::MainAppParam* mainAppParam, const nn::olv::InitializeParam* param);
170
171 //------------------------------------------------------------------------------
172 /**
173 * Finalization.
174 *
175 * Finalizes the OLV library.
176 * Call this function when you are finished using the OLV library.
177 *
178 * Works in offline mode.
179 *
180 * When this function is called, it also finalizes other OLV modules.
181 */
182 void Finalize();
183
184 //------------------------------------------------------------------------------
185 /**
186 * Returns whether the OLV library is available.
187 *
188 * Works in offline mode.
189 * This function is thread-safe.
190 *
191 * @return Returns <tt>true</tt> if it is available, and <tt>false</tt> if it is not.
192 */
193 bool IsInitialized();
194
195 //------------------------------------------------------------------------------
196 /**
197 * Switches the OLV library to online mode.
198 * This results in communications to get a service token and search for a server to connect to.
199 * (The server stores the URLs that the OLV library needs to send and receive data.)
200 *
201 * @retval ResultSuccess Indicates success.
202 * @retval ResultInitializeError Indicates that initialization failed.
203 * @retval ResultNotInitialized Indicates that the object is not initialized.
204 * @retval ResultInitialized Indicates that the object is already initialized in online mode.
205 * @retval ResultCanceled Indicates that the action was canceled.
206 * @retval ResultXmlParseError Indicates a failure to parse raw data.
207 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
208 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
209 * @retval ResultDataNotFound Indicates that the server did not return any data.
210 * @retval ResultHttpError Indicates an HTTP error.
211 * @retval ResultInternalError Indicates an internal error in the library.
212 *
213 * This function can return an error because it internally calls <tt>nn::act::AcquireIndependentServiceToken</tt>.
214 * An <tt>nn::act</tt> error is returned. See the <tt>nn::act</tt> error codes.
215 *
216 * @note If this function fails, the application is prohibited from automatically trying to call the function again.
217
218
219
220
221 */
222 nn::Result SwitchToOnlineMode();
223
224 //------------------------------------------------------------------------------
225 /**
226 * Forcibly terminate the current send/receive operation.
227 * Call this function if you want to cancel a send/receive operation and perform a different operation, or if an operation blocks and does not return for a long period of time.
228 * You can also call this function when the OLV library is not initialized.
229 *
230 * Works in offline mode.
231 * This function is thread-safe.
232 *
233 * @note Calling this function also cancels the processing of the following functions called by the application.
234 * (The function also calls the <tt>nn::act::Cancel</tt> function, but does not return that function's return values.)
235 *
236 * @li <tt>nn::nex::NgsFacade::Login</tt>
237 * @li <tt>nn::act::AcquireIndependentServiceToken</tt>
238 * @li <tt>nn::act::AcquireEcServiceToken</tt>
239 *
240 * @retval nn::ResultSuccess Indicates success.
241 * @retval nn::olv::ResultNotCanceled Indicates that there was no action to cancel.
242 *
243
244
245
246 */
247 nn::Result Cancel();
248
249 //------------------------------------------------------------------------------
250 /**
251 * Uploads a post.
252 * Calling this function triggers communication.
253 *
254 * @note Contact Nintendo support if you plan on using this function for anything other than debugging. (Its use is normally prohibited in retail versions of products.)
255 * @note In addition, the resulting posts uploaded with this function are not shown in the community in the Miiverse application. To check on the display of the posts, use the Activity Feed.
256 * @note To delete the posts, use <tt>@ref nn::olv::DeletePostData</tt>.
257 *
258 * @param[out] uploadedData Buffer storing the result of sending the post. (Specify <tt>NULL</tt> if it is not needed.)
259 * @param[in] uploadParam Parameters for uploading the post.
260 * @retval ResultSuccess Indicates success.
261 * @retval ResultNotInitialized Indicates that the object is not initialized.
262 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
263 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
264 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
265 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
266 * @retval ResultCanceled Indicates that the action was canceled.
267 * @retval ResultNotEnoughMemory Indicates a failure to allocate memory.
268 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
269 * @retval ResultDataNotFound Indicates that the server did not return any data.
270 * @retval ResultInvalidSize Indicates an invalid post size.
271 * @retval ResultHttpError Indicates an HTTP error.
272 * @retval ResultXmlParseError Indicates a failure to parse raw data.
273 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
274 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
275 * @retval ResultInternalError Indicates an internal error in the library.
276
277 */
278 nn::Result UploadPostData(nn::olv::UploadedPostData* uploadedData, const nn::olv::UploadPostDataParam* uploadParam);
279
280 //------------------------------------------------------------------------------
281 /**
282 * Deletes posts.
283 * Calling this function triggers communication.
284 *
285 * @param[in] deleteParam Parameters used when deleting posts.
286 *
287 * @retval ResultSuccess Indicates success.
288 * @retval ResultNotInitialized Indicates that the object is not initialized.
289 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
290 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
291 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
292 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
293 * @retval ResultCanceled Indicates that the action was canceled.
294 * @retval ResultNotEnoughMemory Indicates a failure to allocate memory.
295 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
296 * @retval ResultDataNotFound Indicates that the server did not return any data.
297 * @retval ResultInvalidSize Indicates an invalid post size.
298 * @retval ResultHttpError Indicates an HTTP error.
299 * @retval ResultXmlParseError Indicates a failure to parse raw data.
300 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
301 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
302 * @retval ResultInternalError Indicates an internal error in the library.
303 */
DeletePostData(const DeletePostDataParam * deleteParam)304 inline nn::Result DeletePostData(const DeletePostDataParam* deleteParam)
305 {
306 return UploadPostData(NULL, reinterpret_cast<const UploadPostDataParam*>(deleteParam));
307 }
308
309 //------------------------------------------------------------------------------
310 /**
311 * Downloads posts.
312 * Calling this function triggers communication.
313 *
314 * @param[out] topicData Specifies the location for storing topic data.
315 * @param[out] postDataList Specifies an array for storing posts.
316 * @param[out] downloadedPostDataNum Specifies a variable in which to store the actual number of retrieved posts.
317 * @param[in] downloadPostDataMaxNum Specifies the maximum number of posts to retrieve (the number of elements in the storage array).
318 * @param[in] downloadParam Specifies parameters for downloading posts.
319 *
320 * @retval ResultSuccess Indicates success.
321 * @retval ResultNotInitialized Indicates that the object is not initialized.
322 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
323 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
324 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
325 * @retval ResultInvalidSize Indicates that the size specified in the parameter is invalid.
326 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
327 * @retval ResultXmlParseError Indicates a failure to parse raw data.
328 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
329 * @retval ResultCanceled Indicates that the action was canceled.
330 * @retval ResultHttpError Indicates an HTTP error.
331 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
332 * @retval ResultDataNotFound Indicates that the server did not return any data.
333 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
334 * @retval ResultServerError Indicates that an error occurred on the server.
335 * @retval ResultInternalError Indicates an internal error in the library.
336 */
337 nn::Result DownloadPostDataList(
338 nn::olv::DownloadedTopicData* topicData,
339 nn::olv::DownloadedPostData* postDataList,
340 u32* downloadedPostDataNum,
341 const u32 downloadPostDataMaxNum,
342 const nn::olv::DownloadPostDataListParam* downloadParam);
343
344 //------------------------------------------------------------------------------
345 /**
346 * Uploads a Yeah to a post.
347 * Calling this function triggers communication.
348 *
349 * A Yeah cannot be given to a post by the same user that created the post.
350 * This function returns <tt>ResultHttpError403Forbidden</tt> when users try to give Yeahs to one of their own posts.
351 *
352 * @param[in] uploadParam Specifies parameters for updating the Yeah on a post.
353 *
354 * @retval ResultSuccess Indicates success.
355 * @retval ResultNotInitialized Indicates that the object is not initialized.
356 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
357 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
358 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
359 * @retval ResultCanceled Indicates that the action was canceled.
360 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
361 * @retval ResultDataNotFound Indicates that the server did not return any data.
362 * @retval ResultHttpError Indicates an HTTP error.
363 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
364 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
365 * @retval ResultServerError Indicates that an error occurred on the server.
366 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
367 * @retval ResultXmlParseError Indicates a failure to parse raw data.
368 * @retval ResultInternalError Indicates an internal error in the library.
369
370 */
371 nn::Result UploadEmpathyToPostData(const nn::olv::UploadEmpathyToPostDataParam* uploadParam);
372
373 //------------------------------------------------------------------------------
374 /**
375 * Uploads a direct message.
376 * Calling this function triggers communication.
377 *
378 * @note Contact Nintendo support if you plan on using this function for anything other than debugging. (Its use is normally prohibited in retail versions of products.)
379 * @note To delete the direct messages, use <tt>@ref nn::olv::DeleteDirectMessageData</tt>.
380 *
381 * @param[out] uploadedData Specifies a buffer for storing the result of uploading the direct message. (Specify <tt>NULL</tt> if it is not needed.)
382 * @param[in] uploadParam Specifies parameters for uploading the direct message.
383 * @retval ResultSuccess Indicates success.
384 * @retval ResultNotInitialized Indicates that the object is not initialized.
385 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
386 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
387 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
388 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
389 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
390 * @retval ResultCanceled Indicates that the action was canceled.
391 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
392 * @retval ResultDataNotFound Indicates that the server did not return any data.
393 * @retval ResultHttpError Indicates an HTTP error.
394 * @retval ResultInvalidSize Indicates an invalid post size.
395 * @retval ResultServerError Indicates that an error occurred on the server.
396 * @retval ResultXmlParseError Indicates a failure to parse raw data.
397 * @retval ResultSciError Indicates a failure to retrieve the <b>Parental Controls</b> settings.
398 * @retval ResultInternalError Indicates an internal error in the library.
399
400 */
401 nn::Result UploadDirectMessageData(nn::olv::UploadedDirectMessageData* uploadedData, const nn::olv::UploadDirectMessageDataParam* uploadParam);
402
403 //------------------------------------------------------------------------------
404 /**
405 * Deletes a direct message.
406 * Calling this function triggers communication.
407 *
408 * @param[in] deleteParam Parameters used when deleting direct messages.
409 *
410 * @retval ResultSuccess Indicates success.
411 * @retval ResultNotInitialized Indicates that the object is not initialized.
412 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
413 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
414 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
415 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
416 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
417 * @retval ResultCanceled Indicates that the action was canceled.
418 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
419 * @retval ResultDataNotFound Indicates that the server did not return any data.
420 * @retval ResultHttpError Indicates an HTTP error.
421 * @retval ResultInvalidSize Indicates an invalid post size.
422 * @retval ResultServerError Indicates that an error occurred on the server.
423 * @retval ResultXmlParseError Indicates a failure to parse raw data.
424 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
425 * @retval ResultInternalError Indicates an internal error in the library.
426 */
DeleteDirectMessageData(const DeleteDirectMessageDataParam * deleteParam)427 inline nn::Result DeleteDirectMessageData(const DeleteDirectMessageDataParam* deleteParam)
428 {
429 return UploadDirectMessageData(NULL, reinterpret_cast<const UploadDirectMessageDataParam*>(deleteParam));
430 }
431
432 //------------------------------------------------------------------------------
433 /**
434 * Downloads direct messages.
435 * Calling this function triggers communication.
436 *
437 * @note You can only get direct messages sent from the same application.
438 * @note You cannot get direct messages sent from Miiverse and other applications.
439 *
440 * @param[out] directMessageDataList Specifies the storage array for direct messages.
441 * @param[out] directMessageDataListSize Specifies where the number of actually retrieved direct messages are stored.
442 * @param[in] directMessageDataListMaxSize Specifies the maximum number of direct messages to retrieve (the number of elements in the storage array).
443 * @param[in] downloadParam Specifies parameters for downloading direct messages.
444 *
445 * @retval ResultSuccess Indicates success.
446 * @retval ResultNotInitialized Indicates that the object is not initialized.
447 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
448 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
449 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
450 * @retval ResultInvalidSize Indicates that the size specified in the parameter is invalid.
451 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
452 * @retval ResultXmlParseError Indicates a failure to parse raw data.
453 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
454 * @retval ResultCanceled Indicates that the action was canceled.
455 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
456 * @retval ResultDataNotFound Indicates that the server did not return any data.
457 * @retval ResultHttpError Indicates an HTTP error.
458 * @retval ResultServerError Indicates that an error occurred on the server.
459 * @retval ResultInternalError Indicates an internal error in the library.
460
461
462
463 */
464 nn::Result DownloadDirectMessageDataList(
465 nn::olv::DownloadedDirectMessageData* directMessageDataList,
466 u32* directMessageDataListSize,
467 const u32 directMessageDataListMaxSize,
468 const nn::olv::DownloadDirectMessageDataListParam* downloadParam);
469
470 //------------------------------------------------------------------------------
471 /**
472 * Uploads comments.
473 * Calling this function triggers communication.
474 *
475 * @note Contact Nintendo support if you plan on using this function for anything other than debugging. (Its use is normally prohibited in retail versions of products.)
476 * @note To delete the comments, use <tt>@ref nn::olv::DeleteCommentData</tt>.
477 *
478 * @param[out] uploadedData Specifies the buffer storing the result of uploading the comment data. (Specify <tt>NULL</tt> if it is not needed.)
479 * @param[in] uploadParam Specifies parameters for uploading the comment data.
480 * @retval ResultSuccess Indicates success.
481 * @retval ResultNotInitialized Indicates that the object is not initialized.
482 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
483 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
484 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
485 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
486 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
487 * @retval ResultCanceled Indicates that the action was canceled.
488 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
489 * @retval ResultDataNotFound Indicates that the server did not return any data.
490 * @retval ResultHttpError Indicates an HTTP error.
491 * @retval ResultInvalidSize Indicates an invalid post size.
492 * @retval ResultServerError Indicates that an error occurred on the server.
493 * @retval ResultXmlParseError Indicates a failure to parse raw data.
494 * @retval ResultSciError Indicates a failure to retrieve the <b>Parental Controls</b> settings.
495 * @retval ResultInternalError Indicates an internal error in the library.
496
497 */
498 nn::Result UploadCommentData(nn::olv::UploadedCommentData* uploadedData, const nn::olv::UploadCommentDataParam* uploadParam);
499
500 //------------------------------------------------------------------------------
501 /**
502 * Deletes comments.
503 * Calling this function triggers communication.
504 *
505 * @param[in] deleteParam Parameters used when deleting comments.
506 *
507 * @retval ResultSuccess Indicates success.
508 * @retval ResultNotInitialized Indicates that the object is not initialized.
509 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
510 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
511 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
512 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
513 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
514 * @retval ResultCanceled Indicates that the action was canceled.
515 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
516 * @retval ResultDataNotFound Indicates that the server did not return any data.
517 * @retval ResultHttpError Indicates an HTTP error.
518 * @retval ResultInvalidSize Indicates an invalid post size.
519 * @retval ResultServerError Indicates that an error occurred on the server.
520 * @retval ResultXmlParseError Indicates a failure to parse raw data.
521 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
522 * @retval ResultInternalError Indicates an internal error in the library.
523 */
DeleteCommentData(const DeleteCommentDataParam * deleteParam)524 inline nn::Result DeleteCommentData(const DeleteCommentDataParam* deleteParam)
525 {
526 return UploadCommentData(NULL, reinterpret_cast<const UploadCommentDataParam*>(deleteParam));
527 }
528
529 //------------------------------------------------------------------------------
530 /**
531 * Downloads comments.
532 * Calling this function triggers communication.
533 *
534 * @param[out] commentDataList Specifies an array for storing comments.
535 * @param[out] commentDataListSize Specifies a variable in which to store the actual number of retrieved comments.
536 * @param[in] downloadCommentDataMaxNum Specifies the maximum number of comments to retrieve (the number of elements in the storage array).
537 * @param[in] downloadParam Specifies parameters for downloading comments.
538 *
539 * @retval ResultSuccess Indicates success.
540 * @retval ResultNotInitialized Indicates that the object is not initialized.
541 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
542 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
543 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
544 * @retval ResultInvalidSize Indicates that the size specified in the parameter is invalid.
545 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
546 * @retval ResultXmlParseError Indicates a failure to parse raw data.
547 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
548 * @retval ResultCanceled Indicates that the action was canceled.
549 * @retval ResultHttpError Indicates an HTTP error.
550 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
551 * @retval ResultDataNotFound Indicates that the server did not return any data.
552 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
553 * @retval ResultServerError Indicates that an error occurred on the server.
554 * @retval ResultInternalError Indicates an internal error in the library.
555 */
556 nn::Result DownloadCommentDataList(
557 nn::olv::DownloadedCommentData* commentDataList,
558 u32* commentDataListSize,
559 const u32 downloadCommentDataMaxNum,
560 const nn::olv::DownloadCommentDataListParam* downloadParam);
561
562 //------------------------------------------------------------------------------
563 /**
564 * Uploads community data.
565 * Calling this function triggers communication.
566 *
567 * This function creates, updates, and deletes communities.
568 *
569 * If you set this parameter to a community ID, the function updates that community.
570 * To delete a community, specify the community ID in the same way and set the delete flag.
571 *
572 * @param[out] uploadedData Specifies the buffer storing the result of uploading the community data. (Specify <tt>NULL</tt> if it is not needed.)
573 * @param[in] uploadParam Specifies parameters for updating the community data.
574 *
575 * @retval ResultSuccess Indicates success.
576 * @retval ResultNotInitialized Indicates that the object is not initialized.
577 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
578 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
579 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
580 * @retval ResultInvalidSize Indicates that the size specified in the parameter is invalid.
581 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
582 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
583 * @retval ResultCanceled Indicates that the action was canceled.
584 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
585 * @retval ResultDataNotFound Indicates that the server did not return any data.
586 * @retval ResultHttpError Indicates an HTTP error.
587 * @retval ResultServerError Indicates that an error occurred on the server.
588 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
589 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
590 * @retval ResultInternalError Indicates an internal error in the library.
591 */
592 nn::Result UploadCommunityData(nn::olv::UploadedCommunityData* uploadedData, const nn::olv::UploadCommunityDataParam* uploadParam);
593
594 //------------------------------------------------------------------------------
595 /**
596 * Downloads community data.
597 * Calling this function triggers communication.
598 *
599 * @param[out] communityDataList Specifies an array for storing the communities.
600 * @param[out] communityDataListSize Specifies an out parameter to hold the number of communities that were actually downloaded.
601 * @param[in] communityDataListMaxSize Specifies the maximum number of communities that can be retrieved, based on the size of the storage array.
602 * @param[in] downloadParam Specifies parameters for downloading community data.
603 *
604 * @retval ResultSuccess Indicates success.
605 * @retval ResultNotInitialized Indicates that the object is not initialized.
606 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
607 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
608 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
609 * @retval ResultInvalidSize Indicates that the size specified in the parameter is invalid.
610 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
611 * @retval ResultXmlParseError Indicates a failure to parse raw data.
612 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
613 * @retval ResultCanceled Indicates that the action was canceled.
614 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
615 * @retval ResultDataNotFound Indicates that the server did not return any data.
616 * @retval ResultHttpError Indicates an HTTP error.
617 * @retval ResultServerError Indicates that an error occurred on the server.
618 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
619 * @retval ResultInternalError Indicates an internal error in the library.
620 */
621 nn::Result DownloadCommunityDataList(
622 nn::olv::DownloadedCommunityData* communityDataList,
623 u32* communityDataListSize,
624 const u32 communityDataListMaxSize,
625 const nn::olv::DownloadCommunityDataListParam* downloadParam);
626
627 //------------------------------------------------------------------------------
628 /**
629 * Adds a community to, or deletes a community from, favorites.
630 * Calling this function triggers communication.
631 *
632 * @param[in] favoriteParam Specifies parameters for updating favorite community information.
633 *
634 * @retval ResultSuccess Indicates success.
635 * @retval ResultNotInitialized Indicates that the object is not initialized.
636 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
637 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
638 * @retval ResultCanceled Indicates that the action was canceled.
639 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
640 * @retval ResultDataNotFound Indicates that the server did not return any data.
641 * @retval ResultHttpError Indicates an HTTP error.
642 * @retval ResultServerError Indicates that an error occurred on the server.
643 * @retval ResultXmlParseError Indicates a failure to parse raw data.
644 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
645 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
646 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
647 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
648 * @retval ResultInternalError Indicates an internal error in the library.
649 */
650 nn::Result UploadFavoriteToCommunityData(const nn::olv::UploadFavoriteToCommunityDataParam* favoriteParam);
651
652 //------------------------------------------------------------------------------
653 /**
654 * Follows or unfollows a user.
655 * Calling this function triggers communication.
656 *
657 * @param[in] followParam Specifies parameters used when following or unfollowing a user.
658 *
659 * @retval ResultSuccess Indicates success.
660 * @retval ResultNotInitialized Indicates that the object is not initialized.
661 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
662 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
663 * @retval ResultInvalidParameter Indicates that invalid parameters have been set.
664 * @retval ResultCanceled Indicates that the action was canceled.
665 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
666 * @retval ResultDataNotFound Indicates that the server did not return any data.
667 * @retval ResultHttpError Indicates an HTTP error.
668 * @retval ResultServerError Indicates that an error occurred on the server.
669 * @retval ResultXmlParseError Indicates a failure to parse raw data.
670 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
671 * @retval ResultSciError Indicates a failure to retrieve the Parental Controls settings.
672 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
673 */
674 nn::Result UploadFollowToUserData(
675 const nn::olv::UploadFollowToUserDataParam* followParam);
676
677 //------------------------------------------------------------------------------
678 /**
679 * Downloads user data.
680 * Calling this function triggers communication.
681 *
682 * @param[out] userDataList Specifies an array for storing user data.
683 * @param[out] userDataListSize Specifies a variable in which to store the actual number of retrieved user data entries.
684 * @param[in] userDataListMaxSize Specifies the maximum number of communities that can be retrieved, based on the size of the storage array.
685 * @param[in] downloadParam Specifies parameters for downloading user data.
686 *
687 * @retval ResultSuccess Indicates success.
688 * @retval ResultNotInitialized Indicates that the object is not initialized.
689 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
690 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
691 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
692 * @retval ResultInvalidSize Indicates that the size specified in the parameter is invalid.
693 * @retval ResultMemoryAllocateError Indicates a failure to allocate memory.
694 * @retval ResultXmlParseError Indicates a failure to parse raw data.
695 * @retval ResultNotEnoughMemory Indicates that the system is out of memory.
696 * @retval ResultCanceled Indicates that the action was canceled.
697 * @retval ResultCurlError Indicates that a <tt>Curl</tt> function failed.
698 * @retval ResultDataNotFound Indicates that the server did not return any data.
699 * @retval ResultHttpError Indicates an HTTP error.
700 * @retval ResultServerError Indicates that an error occurred on the server.
701 * @retval ResultInternalError Indicates an internal error in the library.
702 */
703 nn::Result DownloadUserDataList(
704 nn::olv::DownloadedUserData* userDataList,
705 u32* userDataListSize,
706 const u32 userDataListMaxSize,
707 const nn::olv::DownloadUserDataListParam* downloadParam);
708
709 //------------------------------------------------------------------------------
710 /**
711 * Gets the error code that is shown to users.
712 *
713 * Works in offline mode.
714 * This function is thread-safe.
715 *
716 * @param[in] result Specifies the <tt>nn::Result</tt> value returned by the OLV library.
717 *
718 * @return Returns the error code as a seven-digit decimal number.
719 * Returns <tt>OLV_ERROR_CODE_UNKNOWN</tt> if the OLV library has not been initialized, or if it is passed a success result or <tt>nn::Result</tt> value not normally returned by the OLV library.
720
721 */
722 u32 GetErrorCode(const nn::Result& result);
723
724 //------------------------------------------------------------------------------
725 /**
726 * Starts the Miiverse service.
727 *
728 * Works in offline mode.
729 *
730 * @param[in] param Specifies parameters for starting the Miiverse service. Opens the default page if no page is specified.
731 *
732 * @retval ResultSuccess Indicates success.
733 * @retval ResultNotInitialized Indicates that the object is not initialized.
734 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
735 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
736
737 */
738 nn::Result StartPortalApp(const nn::olv::StartPortalAppParam* param = NULL);
739
740 //------------------------------------------------------------------------------
741 /**
742 * Starts the post application in a mode that allows posting data.
743 *
744 * @param[in] param Specifies conditions for starting the post application.
745 * Starts the post application with default settings if not specified.
746 *
747 * @retval ResultSuccess Indicates success.
748 * @retval ResultNotInitialized Indicates that the object is not initialized.
749 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
750 * @retval ResultInvalidSize Indicates that the string is longer than the specified length.
751 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
752 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
753 * @retval ResultSciError Indicates that the SCI function failed.
754 * @retval ResultInvalidParameter Indicates that time stamp data is not correctly set.
755 */
756 nn::Result UploadPostDataByPostApp(const nn::olv::UploadPostDataByPostAppParam* param = NULL);
757
758 //------------------------------------------------------------------------------
759 /**
760 * Starts the post application in a mode that allows posting comments.
761 *
762 * @param[in] param Specifies conditions for starting the post application.
763 *
764 * @retval ResultSuccess Indicates success.
765 * @retval ResultNotInitialized Indicates that the object is not initialized.
766 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
767 * @retval ResultInvalidSize Indicates the string is longer than the specified length.
768 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
769 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
770 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
771 * @retval ResultLibraryRestrictedToUploadByParentalControl Indicates that posting is restricted.
772 * @retval ResultSciError Indicates that the SCI function failed.
773 */
774 nn::Result UploadCommentDataByPostApp(const nn::olv::UploadCommentDataByPostAppParam* param);
775
776 //------------------------------------------------------------------------------
777 /**
778 * Starts the post application in a mode that allows posting direct comments.
779 *
780 * @param[in] param Specifies conditions for starting the post application.
781 *
782 * @retval ResultSuccess Indicates success.
783 * @retval ResultNotInitialized Indicates that the object is not initialized.
784 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
785 * @retval ResultInvalidSize Indicates that the string is longer than the specified length.
786 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
787 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
788 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
789 */
790 nn::Result UploadDirectMessageDataByPostApp(const nn::olv::UploadDirectMessageDataByPostAppParam* param);
791
792 //------------------------------------------------------------------------------
793 /**
794 * Gets the result of updating the post, direct message, or comment using the post application.
795 * Use this function to get the result of the <tt>@ref nn::olv::UploadPostDataByPostApp</tt>, <tt>@ref nn::olv::UploadDirectMessageDataByPostApp</tt>, and <tt>@ref nn::olv::UploadCommentDataByPostApp</tt> functions.
796 * If you also want to get the post results, use the functions <tt>@ref nn::olv::GetResultWithUploadedPostDataByPostApp</tt>, <tt>@ref nn::olv::GetResultWithUploadedDirectMessageDataByPostApp</tt>, and <tt>@ref nn::olv::GetResultWithUploadedCommentDataByPostApp</tt>.
797 *
798 * Call this function when the application has transitioned from the post application to the main application (that is, when you get a foreground message from the SDK.)
799 * For more information about usage, see the sample demos <tt>UploadPostDataByPostApp</tt>, <tt>UploadCommentDataByPostApp</tt> and <tt>UploadDirectMessageDataByPostApp</tt>.
800 *
801 * @retval ResultSuccess Indicates success.
802 * @retval ResultNotInitialized Indicates that the object is not initialized.
803 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
804 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
805 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
806 * @retval ResultInvalidFormat The size of the image attachment is invalid.
807 * @retval ResultCanceled Indicates that the action was canceled.
808 * @retval ResultUnknown Indicates that the function was called at the wrong time.
809
810
811
812
813 */
814 nn::Result GetResultByPostApp();
815
816 //------------------------------------------------------------------------------
817 /**
818 * Gets the result of posting an updated post using the post application.
819 * Use this function to get the result of the <tt>@ref nn::olv::UploadPostDataByPostApp</tt> function.
820 *
821 * Call this function when the application has transitioned from the post application to the main application (that is, when you get a foreground message from the SDK.)
822 * For more information about usage, see the <tt>UploadPostDataByPostApp</tt> sample demo.
823 *
824 * @param[out] uploadedData Specifies a variable in which to store the resulting post.
825 *
826 * @retval ResultSuccess Indicates success.
827 * @retval ResultNotInitialized Indicates that the object is not initialized.
828 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
829 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
830 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
831 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
832 * @retval ResultInvalidFormat Indicates that the <tt>@ref nn::olv::UploadPostDataByPostApp</tt> function was not running the post application when this function was called.
833 * Or it indicates that the size of the image attachment is invalid.
834 * @retval ResultCanceled Indicates that the action was canceled.
835 * @retval ResultUnknown Indicates that the function was called at an incorrect time.
836
837
838 */
839 nn::Result GetResultWithUploadedPostDataByPostApp(nn::olv::UploadedPostData* uploadedData);
840
841 //------------------------------------------------------------------------------
842 /**
843 * Gets the result of posting an updated direct message using the post application.
844 * Use this function to get the result of the <tt>@ref nn::olv::UploadDirectMessageDataByPostApp</tt> function.
845 *
846 * Call this function when the application has transitioned from the post application to the main application (that is, when you get a foreground message from the SDK.)
847 * For more information about usage, see the <tt>UploadDirectMessageDataByPostApp</tt> sample demo.
848 *
849 * @param[out] uploadedData Specifies a pointer to the location storing the resulting posted direct message.
850 *
851 * @retval ResultSuccess Indicates success.
852 * @retval ResultNotInitialized Indicates that the object is not initialized.
853 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
854 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
855 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
856 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
857 * @retval ResultInvalidFormat Indicates that the <tt>@ref nn::olv::UploadDirectMessageDataByPostApp</tt> function was not running the post application when this function was called.
858 * Or it indicates that the size of the image attachment is invalid.
859 * @retval ResultCanceled Indicates that the action was canceled.
860 * @retval ResultUnknown Indicates that the function was called at an incorrect time.
861
862
863 */
864 nn::Result GetResultWithUploadedDirectMessageDataByPostApp(nn::olv::UploadedDirectMessageData* uploadedData);
865
866 //------------------------------------------------------------------------------
867 /**
868 * Gets the result of posting updated comment data using the post application.
869 * Use this function to get the result of the <tt>@ref nn::olv::UploadCommentDataByPostApp</tt> function.
870 *
871 * Call this function when the application has transitioned from the post application to the main application (that is, when you get a foreground message from the SDK.)
872 * For more information about usage, see the <tt>UploadCommentDataByPostApp</tt> sample demo.
873 *
874 * @param[out] uploadedData Specifies a pointer to the location storing the resulting posted comment data.
875 *
876 * @retval ResultSuccess Indicates success.
877 * @retval ResultNotInitialized Indicates that the object is not initialized.
878 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
879 * @retval ResultSystemUpdateRequired Indicates that a system update is required.
880 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
881 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
882 * @retval ResultInvalidFormat Indicates that the <tt>@ref nn::olv::UploadCommentDataByPostApp</tt> function was not running the post application when this function was called.
883 * Or it indicates that the size of the image attachment is invalid.
884 * @retval ResultCanceled Indicates that the action was canceled.
885 * @retval ResultUnknown Indicates that the function was called at an incorrect time.
886
887
888 */
889 nn::Result GetResultWithUploadedCommentDataByPostApp(nn::olv::UploadedCommentData* uploadedData);
890
891 //------------------------------------------------------------------------------
892 /**
893 * Gets the URL for the notification information to retrieve.
894 *
895 * @param[out] url Specifies a character array for storing the URL.
896 * Pass in a buffer of size <tt>nn::olv::URL_BUFF_LENGTH</tt>.
897 * @param[in] urlMaxLength Specifies the size of the URL buffer.
898 * @param[in] param Specifies the parameter for getting the notification URL.
899 *
900 * @retval ResultSuccess Indicates success.
901 * @retval ResultNotInitialized Indicates that the object is not initialized.
902 * @retval ResultOfflineMode Indicates that the object was initialized in offline mode.
903 * @retval ResultInvalidParameter Indicates that a parameter was configured incorrectly.
904 * @retval ResultInvalidPointer Indicates that a required parameter was set to <tt>NULL</tt>.
905 * @retval ResultInvalidSize Indicates that the size specified in the parameter is invalid.
906 */
907 nn::Result GetNotificationsUrl(char* url, const u32 urlMaxLength, const nn::olv::GetNotificationsUrlParam* param);
908
909 //------------------------------------------------------------------------------
910 /**
911 * Preloads the posting applet.
912 *
913 * @note Currently, there is no high-speed function for quickly starting the applet even if it is preloaded using this function.
914 * @note This function is not recommended for use by applications.
915 *
916 * Works in offline mode.
917 *
918 * @retval ResultSuccess Indicates success.
919 * @retval ResultNotInitialized Indicates that the object is not initialized.
920 * @retval ResultPostappPreloadFailed Indicates that preloading failed.
921
922 */
923 nn::Result PreloadPostApp(void);
924
925
926 /** @} */
927
928
929 }
930 }
931
932
933 #endif
934