CTR Pia  4.11.3
Game Communication Engine
chat_Api.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: chat_Api.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 #pragma once
16 
17 #include <pia/chat/chat_definitions.h>
18 
19 
20 namespace nn
21 {
22 namespace pia
23 {
24 namespace chat
25 {
26 
27 
28 /*!
29 @brief Determines whether the <tt>chat</tt> module is initialized.
30 
31 @details This function is thread-safe.
32 
33 @return Returns <tt>true</tt> if it is initialized, and <tt>false</tt> otherwise.
34 @see Initialize, Finalize
35 */
36 bool IsInitialized(void);
37 
38 
39 /*!
40 @brief Initializes the <tt>chat</tt> module.
41 
42 @return Returns a <tt>Result</tt> value indicating success if initialization succeeds. You must make sure that the implementation of this function in your application does not return any errors.
43 @retval ResultAlreadyInitialized Indicates that the chat module is already initialized. Programming error. Fix your program so that this error is not returned.
44 @retval ResultInvalidState <tt>PiaCommon</tt> has not been initialized. Programming error. Fix your program so that this error is not returned.
45 @see IsInitialized, Finalize
46 */
47 nn::Result Initialize(void);
48 
49 
50 /*!
51 @brief Finalizes the <tt>chat</tt> module.
52 This function does nothing and returns if it is called before the <tt>Initialize</tt> function has been called.
53 
54 @see IsInitialized, Initialize
55 
56 */
57 void Finalize(void);
58 
59 
60 /*!
61 @brief Declares the start of setup.
62 
63 @details Call this function before creating a singleton in the <tt>chat</tt> module.
64 Always call this function and <tt>@ref EndSetup</tt> even if your application does not create any singletons in the <tt>chat</tt> module.
65 
66 @return Returns a <tt>Result</tt> value indicating success if called at the right time. You must make sure that the implementation of this function in your application does not return any errors.
67 @retval ResultNotInitialized Indicates that the <tt>chat::Initialize</tt> function has not been called. Programming error. Fix your program so that this error is not returned.
68 @retval ResultInvalidState Indicates that the function was called at the wrong time. Programming error. Fix your program so that this error is not returned.
69 @see EndSetup
70 
71 */
72 nn::Result BeginSetup(void);
73 
74 
75 /*!
76 @brief Declares the end of setup.
77 
78 @details Call this function after creation of a singleton in the <tt>chat</tt> module is complete.
79 Calling this function configures memory to be used by the <tt>chat</tt> module singletons, and optimizes memory management within the library.
80 Always call <tt>@ref BeginSetup</tt> and this function even if your application does not create any singletons in the <tt>chat</tt> module.
81 
82 @return Returns a <tt>Result</tt> value indicating success if called at the right time. You must make sure that the implementation of this function in your application does not return any errors.
83 @retval ResultNotInitialized Indicates that the <tt>chat::Initialize</tt> function has not been called. Programming error. Fix your program so that this error is not returned.
84 @retval ResultInvalidState Indicates that the function was called at the wrong time. Programming error. Fix your program so that this error is not returned.
85 @see BeginSetup
86 
87 
88 */
89 nn::Result EndSetup(void);
90 
91 
92 /*!
93 @cond PRIVATE
94 @brief Indicates whether an application is executing code between calls to the <tt>BeginSetup()</tt> and <tt>EndSetup()</tt> functions.
95 
96 @details This function is thread-safe.
97 */
98 bool IsInSetupMode(void);
99 //! @endcond
100 
101 u32 ConvertID_Pia2VCT(u32);
102 u32 ConvertID_VCT2Pia(u32);
103 }
104 }
105 } // end of namespace nn::pia::chat
nn::Result BeginSetup(void)
Declares the start of setup.
void Finalize(void)
Finalizes the chat module. This function does nothing and returns if it is called before the Initiali...
Definition: assert.h:115
bool IsInitialized(void)
Determines whether the chat module is initialized.
nn::Result Initialize(void)
Initializes the chat module.
nn::Result EndSetup(void)
Declares the end of setup.