Nintendo 3DS Miiverse Library  1.3.2
(OLV/Olive)
olv_TypesInitialize.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*
2 Project: OLV
3 File: olv_TypesInitialize.h
4 
5 Copyright (C) 2009-2013 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 #ifndef __OLV_TYPES_INITIALIZE_H_
15 #define __OLV_TYPES_INITIALIZE_H_
16 
17 /*! @file
18 @brief Declaration of types related to OLV initialization.
19 */
20 
21 #include <nn/config.h>
22 #include <nn/types.h>
23 
24 /// <span>nn</span>
25 namespace nn {
26 
27 /// <span>olv</span>
28 namespace olv {
29 
30 namespace internal
31 {
32 class Main;
33 }
34 
35 /*/* @defgroup class Classes
36  * @{
37  */
38 
39 /*!
40 @brief Represents the parameters when initializing the OLV library.
41 */
43 {
44 public:
45  /*!
46 @brief Instantiates the object.
47  */
49 
50  /*!
51 @brief Reverts parameters to their initial state.
52  */
53  void Reset();
54 
55  /*!
56 @brief Sets flags.
57 
58 This is for future expansion. It is not used currently.
59 
60 @param[in] flags Flags (<tt>FLAG_*</tt>).
61  */
62  void SetFlags(u32 flags);
63 
64  /*!
65 @brief Gets the size of the working buffer the OLV library uses.
66 
67 Call this function after all of the various parameters have been specified, with the exception of the <tt>@ref SetWork</tt> function. <br />
68 This function returns fixed values.
69 
70 @return Returns the size of the working buffer the OLV library uses.
71  */
72  u32 GetWorkSize() const;
73 
74  /*!
75 @brief Sets the working buffer for the OLV library.
76 
77 You must specify this option. <br />
78 Specify a buffer of at least the size obtained with the <tt>@ref GetWorkSize</tt> function. <br />
79 This buffer cannot be destroyed at the point the call to the <tt>@ref nn::olv::Initialize</tt> function finishes. See the description of the <tt>@ref nn::olv::Initialize</tt> function.
80 
81 @param[in] work The working buffer.
82 @param[in] workSize The size of the working buffer.
83  */
84  void SetWork(u8* work, u32 workSize);
85 
86 protected:
87  u32 m_Flags;
88  u8* m_Work;
89  u32 m_WorkSize;
90  u8 m_Reserved[64-12];
91 
92  friend class nn::olv::internal::Main;
93 };
94 
95 /*!
96 @brief The class that stores the results when the OLV library is initialized.
97 */
99 {
100 public:
101  /*!
102 @brief Instantiates the object.
103  */
104  InitializedData();
105 
106  /*!
107 @brief Reverts parameters to their initial state.
108  */
109  void Reset();
110 
111 protected:
112  u32 m_Flags;
113  u8 m_Reserved[512-4];
114 
115  friend class nn::olv::internal::Main;
116 };
117 
118 /** @} */
119 
120 } // namespace olv
121 } // namespace nn
122 #endif