1 /*--------------------------------------------------------------------------* 2 3 Copyright (C) 2012 Nintendo. All rights reserved. 4 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 11 *---------------------------------------------------------------------------*/ 12 13 #ifndef NN_BOSS_BOSS_TASKSETTING_H_ 14 #define NN_BOSS_BOSS_TASKSETTING_H_ 15 16 #include <nn/boss/boss_Const.h> 17 #include <nn/boss/boss_Result.h> 18 #include <nn/boss/boss_Types.h> 19 20 21 #ifdef __cplusplus 22 23 namespace nn { 24 namespace boss { 25 26 /*! 27 @addtogroup nn_boss_api 28 @{ 29 */ 30 31 /*! 32 @brief Represents task settings. Used when registering a task. 33 */ 34 class TaskSetting 35 { 36 friend class Task; 37 friend class PrivateTaskSetting; 38 friend class PrivateNetTaskSetting; 39 friend class PrivateNbdlTaskSetting; 40 friend class TaskSettingTester; 41 42 public: 43 /*! 44 @brief Constructor. 45 */ 46 explicit TaskSetting(void); 47 48 /*! 49 @brief Destructor. 50 */ 51 virtual ~TaskSetting(void); 52 53 /*! 54 @brief Initializes task settings. 55 56 */ 57 void InitializeSetting(void); 58 59 /*! 60 @brief Sets whether to allow tasks to run when <b>Online Interaction in Games</b> is restricted in <b>Parental Controls</b>. 61 62 Tasks cannot run by default if this setting is not made and <b>Online Interaction in Games</b> is restricted in <b>Parental Controls</b>. 63 64 @param[in] canRun Specifies whether tasks are allowed to run. Specify <tt>true</tt> if tasks are allowed to run. Otherwise, specify <tt>false</tt>. 65 */ 66 void SetRunPermissionInParentalControlRestriction( bool canRun ); 67 68 protected: 69 u8 m_settingBuf[TASK_RECORD_SIZE]; 70 71 virtual nn::Result RegisterPreprocess( nn::boss::AccountID accountId, nn::boss::TitleID titleId, const char* taskId ); 72 73 virtual void RegisterPostprocess( nn::boss::AccountID accountId, nn::boss::TitleID titleId, const char* taskId, nn::Result registerResult); 74 75 }; 76 77 //! @} 78 79 } // end of namespace boss 80 } // end of namespace nn 81 82 #endif // __cplusplus 83 84 #endif /* NN_BOSS_BOSS_TASKSETTING_H_ */ 85