1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: boss_TaskPolicy.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. 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 $Rev: 46347 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_BOSS_BOSS_TASK_POLICY_H_ 17 #define NN_BOSS_BOSS_TASK_POLICY_H_ 18 19 #include <nn/boss/boss_Const.h> 20 #include <nn/boss/boss_Result.h> 21 #include <nn/boss/boss_Types.h> 22 23 #ifdef __cplusplus 24 25 namespace nn { 26 namespace boss { 27 28 /* Please see man pages for details 29 30 */ 31 class TaskPolicy 32 { 33 public: 34 /* Please see man pages for details 35 36 */ 37 explicit TaskPolicy(void); 38 39 /* Please see man pages for details 40 41 */ 42 virtual ~TaskPolicy(void); 43 44 /* Please see man pages for details 45 46 47 48 49 50 51 52 53 54 */ Initialize(u32 interval,u32 count)55 inline nn::Result Initialize(u32 interval, u32 count){return InitializeWithSecInterval(interval*60*60, count);} 56 57 /* Please see man pages for details 58 59 60 61 62 63 64 65 66 67 */ 68 nn::Result InitializeWithSecInterval(u32 intervalSec, u32 count); 69 70 /* Please see man pages for details 71 72 73 74 75 76 77 78 79 */ Initialize(TaskPriority priority,u32 interval,u32 count)80 inline nn::Result Initialize(TaskPriority priority, u32 interval, u32 count){return InitializeWithSecInterval(priority, interval*60*60, count);} 81 82 /* Please see man pages for details 83 84 85 86 87 88 89 90 91 92 93 */ 94 nn::Result InitializeWithSecInterval(TaskPriority priority, u32 intervalSec, u32 count); 95 96 /* Please see man pages for details 97 98 99 100 101 102 103 104 */ 105 nn::Result SetDuration(u32 duration); 106 107 /* Please see man pages for details 108 109 110 111 112 113 114 115 116 117 118 119 */ 120 nn::Result SetPriority(TaskPriority priority); 121 122 123 /* Please see man pages for details 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 */ 139 nn::Result SetProperty(PropertyType type, const void* pValue, size_t size); 140 141 /* Please see man pages for details 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 */ 161 nn::Result GetProperty(PropertyType type, void* pValue, size_t size); 162 163 protected: 164 friend class AccessConfig; 165 TaskPolicyConfig m_Policy; 166 private: 167 }; 168 169 } 170 } 171 172 #endif 173 174 #endif /* NN_BOSS_BOSS_TASK_POLICY_H_ */ 175