Nintendo 3DS Miiverse Library  1.3.2
(OLV/Olive)
olv_TypesUploadFollowToUserData.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*
2  Project: OLV
3  File: olv_TypesUploadFollowToUserData.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_UPLOAD_FOLLOW_TO_USER_DATA_H_
15 #define __OLV_TYPES_UPLOAD_FOLLOW_TO_USER_DATA_H_
16 
17 /*! @file
18  @brief OLV type declarations related to the following of user data.
19 */
20 
21 #include <nn/config.h>
22 #include <nn/types.h>
23 #include <nn/olv/olv_Const.h>
24 #include <nn/olv/olv_Result.h>
25 
26 /// <span>nn</span>
27 namespace nn {
28 
29 /// <span>olv</span>
30 namespace olv {
31 
32 namespace internal
33 {
34 class Main;
35 }
36 
37 /*/* @defgroup class Classes
38  * @{
39  */
40 
41 /*!
42  @brief The class representing the parameters used when following users and canceling the following of users.
43 */
45 {
46 public:
47  /*!
48  @brief Flags that can be specified in the <tt>@ref SetFlags</tt> function.
49  */
50  enum
51  {
52  FLAG_NONE = 0, //!< This is the state when no flags are specified.
53  FLAG_REMOVE = (1<<0) //!< Specify this flag when canceling the following of users.
54  };
55 
56  /*!
57  @brief Instantiates the object.
58  */
60 
61  /*!
62  @brief Reverts parameters to their initial state.
63  */
64  void Reset();
65 
66  /*!
67  @brief Sets flags.
68 
69  Specifying this option is not required.
70 
71  @param[in] flags Flags (<tt>FLAG_*</tt>).
72  */
73  void SetFlags(u32 flags);
74 
75  /*!
76  @brief Sets the principal ID.
77 
78  You must specify this option.
79 
80  @param[in] userPid The principal ID.
81  */
82  void SetUserPid(u32 userPid);
83 
84  /*!
85  @brief Gets the size of the working buffer to use with the <tt>@ref nn::olv::UploadFollowToUserData</tt> function.
86 
87  Call this function after all of the various parameters have been specified, with the exception of the <tt>@ref SetWork</tt> function. <br />
88 
89  @return Returns the size of the working buffer to use with the <tt>@ref nn::olv::UploadFollowToUserData</tt> function.
90  */
91  u32 GetWorkSize() const;
92 
93  /*!
94  @brief Specifies the working buffer to use with the <tt>@ref nn::olv::UploadFollowToUserData</tt> function.
95 
96  You must specify this option. <br />
97  Specify a buffer of at least the size obtained with the <tt>GetWorkSize</tt> function. <br />
98 
99  @param[in] work The working buffer.
100  @param[in] workSize The size of the working buffer.
101  */
102  void SetWork(u8* work, u32 workSize);
103 
104 private:
105  u32 m_Flags;
106  u8* m_Work;
107  u32 m_WorkSize;
108  u32 m_UserPid;
109  u8 m_Reserved[64-16];
110 
111  friend class nn::olv::internal::Main;
112 };
113 
114 /** @} */
115 
116 } // namespace olv
117 } // namespace nn
118 #endif