CTR Pia  4.11.3
Game Communication Engine
local_LocalCreateSessionSetting.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: local_LocalCreateSessionSetting.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_CreateSessionSetting.h>
18 #include <pia/local/local_LocalSessionTypes.h>
19 
20 #include <pia/common/common_SignatureSetting.h>
21 
22 namespace nn
23 {
24 namespace pia
25 {
26 namespace local
27 {
28 
29 // Forward declarations.
31 
32 /*!
33 @brief Base class that manages the settings for the <tt>CreateSession</tt> function with a <tt>LocalNetwork</tt> object.
34 
35 @details This class is never instantiated by an application.
36 Use a class that inherits this class.
37 
38 @see nn::pia::local::UdsCreateSessionSetting
39 
40 @date 2014-03-03 Initial version.
41 */
43 {
44 public:
45 /*!
46 @cond PRIVATE
47 @brief Destroys the object.
48 */
49  virtual ~LocalCreateSessionSetting();
50  //! @endcond
51 
52  const virtual LocalCreateNetworkSetting* GetLocalCreateNetworkSetting() const = 0;
53  virtual void SetLocalCreateNetworkSetting(const LocalCreateNetworkSetting& createNetworkSetting) = 0;
54 
55 /*!
56 @cond PRIVATE
57 */
58  const char* GetSignatureKeyData() const
59  {
60  return m_SignatureKeyData;
61  }
62  //! @endcond
63 
64 /*!
65 @cond PRIVATE
66 */
67  size_t GetSignatureKeyDataSize() const
68  {
69  return m_SignatureKeyDataSize;
70  }
71  //! @endcond
72 
73 /*!
74 @brief Sets the session key and its size.
75 
76 @details Set the session key size to no more than <tt>@ref common::SignatureSetting::SIGNATURE_KEY_DATA_SIZE_MAX</tt>.
77 
78 @param[in] pSignatureKeyData The session key.
79 @param[in] signatureKeyDataSize The size of the session key.
80 
81 @return Returns a <tt>Result</tt> value for which the <tt>IsSuccess</tt> function returns <tt>true</tt> if execution succeeds.
82 
83 @retval ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.
84 */
85  nn::Result SetSignatureKey(const char* pSignatureKeyData, size_t signatureKeyDataSize);
86 
87  // Prints information that is useful for debugging.
88  virtual void Trace(u64 flag) const;
89 
90 protected:
92  size_t m_SignatureKeyDataSize;
93 
94 /*!
95 @cond PRIVATE
96 @brief Instantiates an object.
97 */
99  //! @endcond
100 
101 private:
102  // The copy constructor is sealed.
104 
105  // The assignment operator is sealed.
107 };
108 }
109 }
110 } // end of namespace nn::pia::local
Base class that manages the settings for the CreateSession function with a LocalNetwork object...
Definition: local_LocalCreateSessionSetting.h:42
Definition: assert.h:115
nn::Result SetSignatureKey(const char *pSignatureKeyData, size_t signatureKeyDataSize)
Sets the session key and its size.
Base class that manages settings specific to session creation.
Definition: session_CreateSessionSetting.h:38
static const u32 SIGNATURE_KEY_DATA_SIZE_MAX
Maximum number of bytes for the key data used for the signature.
Definition: common_SignatureSetting.h:36
Class for configuring the creation of a local network.
Definition: local_LocalNetworkSetting.h:102