1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     hid_Result.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_HID_CTR_HID_RESULT_H_
17 #define NN_HID_CTR_HID_RESULT_H_
18 
19 #include <nn/Result.h>
20 
21 namespace nn {
22 namespace hid {
23 namespace CTR {
24 
25 /* Please see man pages for details
26 
27 
28 */
MakeResultAlreadyInitialized()29     inline Result MakeResultAlreadyInitialized()
30     {
31         return MakeUsageResult( Result::SUMMARY_INVALID_STATE, Result::MODULE_NN_HID, Result::DESCRIPTION_ALREADY_INITIALIZED );
32     }
33 /* Please see man pages for details
34 
35 
36 */
MakeResultInvalidCombination()37     inline Result MakeResultInvalidCombination()
38     {
39         return MakeUsageResult( Result::SUMMARY_INVALID_ARGUMENT, Result::MODULE_NN_HID, Result::DESCRIPTION_INVALID_COMBINATION );
40     }
41 
MakeResultOutOfMemory()42     inline Result MakeResultOutOfMemory()
43     {
44         return MakePermanentResult( Result::SUMMARY_OUT_OF_RESOURCE, Result::MODULE_NN_HID, Result::DESCRIPTION_OUT_OF_MEMORY );
45     }
46 
47     /* Please see man pages for details
48 
49 
50     */
MakeResultNotInitialized()51     inline Result MakeResultNotInitialized()
52     {
53         return MakeUsageResult(Result::SUMMARY_INVALID_STATE, Result::MODULE_NN_HID, Result::DESCRIPTION_NOT_INITIALIZED);
54     }
55 
56     /* Please see man pages for details
57 
58 
59      */
MakeResultNoConnection()60     inline Result MakeResultNoConnection()
61     {
62         return MakeUsageResult(Result::SUMMARY_NOT_FOUND, Result::MODULE_NN_HID, Result::DESCRIPTION_NOT_FOUND);
63     }
64 
65 
66     // For internal use
67     // Indicates that no saved value was specified as the touch panel CAL value.
MakeResultNoData()68     inline Result MakeResultNoData()
69     {
70         return MakePermanentResult( Result::SUMMARY_NOT_FOUND, Result::MODULE_NN_HID, Result::DESCRIPTION_NO_DATA );
71     }
72 
73     // For internal use
74     // Indicates that the value attempted to be saved as the analog stick CAL value was invalid.
MakeResultOutOfRange()75     inline Result MakeResultOutOfRange()
76     {
77         return MakeUsageResult( Result::SUMMARY_INVALID_STATE, Result::MODULE_NN_HID, Result::DESCRIPTION_OUT_OF_RANGE );
78     }
79 
80     // For internal use
81     // Indicates that a function without rights to the connection port was called.
MakeResultNotAuthorized()82     inline Result MakeResultNotAuthorized()
83     {
84         return MakeUsageResult( Result::SUMMARY_INVALID_STATE, Result::MODULE_NN_HID, Result::DESCRIPTION_NOT_AUTHORIZED );
85     }
86 
87 } // namespace CTR
88 } // namespace hid
89 } // namespace nn
90 
91 #endif //NN_HID_CTR_HID_RESULT_H_
92