CTR Pia  4.11.3
Game Communication Engine
inet_NexJoinSessionSetting.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: inet_NexJoinSessionSetting.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/session/session_JoinSessionSetting.h>
18 #include <pia/inet/inet_NexSessionTypes.h>
19 
20 namespace nn
21 {
22 namespace pia
23 {
24 namespace inet
25 {
26 /*!
27  @brief Class that manages settings specific to NEX session participation.
28 
29  @date 2014-05-16 Added the <tt>SetSessionUserPassword()</tt> and <tt>SetSessionSystemPassword()</tt> functions.
30  @date 2014-04-30 Added the <tt>SetSessionId()</tt> and <tt>GetSessionId()</tt> functions.
31  @date 2014-02-03 Initial version.
32 
33  @see nn::pia::session::JoinSessionSetting
34 */
35 
37 {
38 public:
39 /*!
40  @brief The default constructor.
41 */
43 
44 /*!
45  @brief The destructor.
46 */
47  virtual ~NexJoinSessionSetting();
48 
49 /*!
50  @brief Configures a target session ID.
51  @param[in] id The target session ID.
52 */
53  virtual void SetSessionId(u32 id);
54 
55 /*!
56  @cond PRIVATE
57  @brief Gets a target session ID.
58  @return Returns the target session ID.
59 */
60  virtual u32 GetSessionId() const;
61  //! @endcond
62 
63 /*!
64  @cond PRIVATE
65  @brief Sets the maximum number of participants in the target session.
66  @param[in] num The maximum number of participants in the target session.
67 */
68  virtual void SetMaxParticipants(u16 num);
69  //! @endcond
70 
71 /*!
72  @cond PRIVATE
73  @brief Gets the maximum number of participants in the target session.
74  @return Returns the maximum number of participants in the target session.
75 */
76  virtual u16 GetMaxParticipants() const;
77  //! @endcond
78 
79 /*!
80  @brief Sets the session's user password.
81  @details If a user password is already set for the session, this function confirms that they match. The default is an empty character string.
82  @param[in] pUserPassword The user password.
83  @param[in] passwordLength The user password's string length.
84 */
85  void SetSessionUserPassword(const wchar_t* pUserPassword, size_t passwordLength);
86 
87 /*!
88  @cond PRIVATE
89  @brief Gets the user password for the session.
90  @return Returns the user password for the session.
91 */
92  const wchar_t* GetSessionUserPassword() const;
93  //! @endcond
94 
95 /*!
96  @brief Sets the session's system password.
97  @details If a system password is already set for the session, this function confirms that they match. The default is an empty character string.
98  @param[in] pSystemPassword The system password.
99  @param[in] passwordLength The system password's string length.
100 */
101  void SetSessionSystemPassword(const wchar_t* pSystemPassword, size_t passwordLength);
102 
103 /*!
104  @cond PRIVATE
105  @brief Gets the system password for the session.
106  @return Returns the system password for the session.
107 */
108  const wchar_t* GetSessionSystemPassword() const;
109  //! @endcond
110 
111 /*!
112  @cond PRIVATE
113  @brief Prints information that is useful for debugging.
114 */
115  virtual void Trace(u64 flag) const;
116  //! @endcond
117 
118 protected:
119 #if NN_PIA_NEX_NEW_FEATURE_FOR_MATCHMAKE
120  // Pointer to the user password configured for the new session.
121  wchar_t m_UserPassword[nn::pia::inet::SESSION_USER_PASSWORD_LENGTH + 1];
122  wchar_t m_SystemPassword[nn::pia::inet::SESSION_SYSTEM_PASSWORD_LENGTH + 1];
123 #endif
124 
125 private:
126  u32 m_SessionId;
127  u16 m_MaxParticipants;
128 
129  // The copy constructor is sealed.
131 
132  // The assignment operator is sealed.
133  NexJoinSessionSetting& operator=(const NexJoinSessionSetting&);
134 };
135 }
136 }
137 } // End of namespace nn::pia::inet.
virtual void SetSessionId(u32 id)
Configures a target session ID.
Definition: assert.h:115
NexJoinSessionSetting()
The default constructor.
const u32 SESSION_USER_PASSWORD_LENGTH
The user password&#39;s string length.
Definition: inet_NexSessionTypes.h:52
Class that manages settings specific to NEX session participation.
Definition: inet_NexJoinSessionSetting.h:36
virtual ~NexJoinSessionSetting()
The destructor.
const u32 SESSION_SYSTEM_PASSWORD_LENGTH
The system password&#39;s string length.
Definition: inet_NexSessionTypes.h:51
void SetSessionSystemPassword(const wchar_t *pSystemPassword, size_t passwordLength)
Sets the session&#39;s system password.
Base class that manages settings specific to session joining.
Definition: session_JoinSessionSetting.h:39
void SetSessionUserPassword(const wchar_t *pUserPassword, size_t passwordLength)
Sets the session&#39;s user password.