CTR Pia  4.11.3
Game Communication Engine
local_UdsJoinSessionSetting.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: local_UdsJoinSessionSetting.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/local/local_LocalJoinSessionSetting.h>
18 
19 namespace nn
20 {
21 namespace pia
22 {
23 namespace local
24 {
25 /*!
26 @brief Class that manages <tt>JoinSession</tt> settings in <tt>LocalNetwork</tt> sessions.
27 
28 @date 2014-03-03 Initial version.
29 */
30 
32 {
33 public:
34  //! Specifies the minimum size of the passphrase used to encrypt the wireless layer.
35  static const size_t PASSPHRASE_LENGTH_MIN = nn::uds::UDS_PASSPHRASE_LENGTH_MIN;
36 
37  //! Specifies the maximum size of the passphrase used to encrypt the wireless layer.
38  static const size_t PASSPHRASE_LENGTH_MAX = nn::uds::UDS_PASSPHRASE_LENGTH_MAX;
39 
40 /*!
41 @brief Instantiates an object.
42 */
44  {
45  }
46 
47 /*!
48 @brief Destroys the object.
49 */
50  virtual ~UdsJoinSessionSetting() {};
51 
52 /*!
53 @cond PRIVATE
54 */
55  virtual const char* GetPassphrase() const
56  {
57  return m_Passphrase;
58  }
59  //! @endcond
60 
61 /*!
62 @brief Sets the passphrase used for encrypting the wireless layer and its size.
63 
64 @details Set the size of the passphrase to a value of at least <tt>@ref PASSPHRASE_LENGTH_MIN</tt> but no more than <tt>@ref PASSPHRASE_LENGTH_MAX</tt>.
65 
66 @param[in] pPassphrase Specifies the passphrase to use for wireless layer encryption.
67 @param[in] passphraseSize Specifies the size of the passphrase to use for wireless layer encryption.
68 
69 @return Returns a <tt>Result</tt> value for which the <tt>IsSuccess</tt> function returns <tt>true</tt> if execution succeeds.
70 
71 @retval ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.
72 */
73  virtual nn::Result SetPassphrase(const char* pPassphrase, size_t passphraseSize);
74 
75 protected:
76  char m_Passphrase[PASSPHRASE_LENGTH_MAX];
77 
78 private:
79  // The copy constructor is sealed.
81 
82  // The assignment operator is sealed.
84 };
85 }
86 }
87 } // end of namespace nn::pia::local
static const size_t PASSPHRASE_LENGTH_MAX
Specifies the maximum size of the passphrase used to encrypt the wireless layer.
Definition: local_UdsJoinSessionSetting.h:38
Class that manages JoinSession settings in LocalNetwork sessions.
Definition: local_UdsJoinSessionSetting.h:31
Definition: assert.h:115
UdsJoinSessionSetting()
Instantiates an object.
Definition: local_UdsJoinSessionSetting.h:43
static const size_t PASSPHRASE_LENGTH_MIN
Specifies the minimum size of the passphrase used to encrypt the wireless layer.
Definition: local_UdsJoinSessionSetting.h:35
virtual ~UdsJoinSessionSetting()
Destroys the object.
Definition: local_UdsJoinSessionSetting.h:50
Base class that manages the settings for the JoinSession function with a LocalNetwork object...
Definition: local_LocalJoinSessionSetting.h:41
virtual nn::Result SetPassphrase(const char *pPassphrase, size_t passphraseSize)
Sets the passphrase used for encrypting the wireless layer and its size.