1 /*---------------------------------------------------------------------------*
2 Project: news
3 File: news_UserResult.h
4
5 Copyright (C)2010 Nintendo Co., Ltd. All rights reserved.
6
7 These coded instructions, COLORments, 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$
14 *---------------------------------------------------------------------------*/
15
16 #ifndef NN_NEWS_CTR_USER_USERRESULT_H_
17 #define NN_NEWS_CTR_USER_USERRESULT_H_
18
19 #include <nn/Result.h>
20
21 namespace nn {
22 namespace news {
23 namespace CTR {
24 namespace user {
25
26 enum Description
27 {
28 DESCRIPTION_NONE,
29 DESCRIPTION_INVALID_SUBJECT_SIZE, //!< 表題のサイズが大きすぎます.
30 DESCRIPTION_INVALID_MESSAGE_SIZE, //!< 本文のサイズが大きすぎます.
31 DESCRIPTION_INVALID_PICTURE_SIZE, //!< 画像のサイズが大きすぎます.
32 DESCRIPTION_INVALID_PICTURE, //!< 画像が不正です.
33 DESCRIPTION_MAX
34 };
35
36 /*!
37 :category Result
38 @class nn::news::ResultInvalidSubjectSize
39 @brief 表題のサイズが大きすぎます.
40 */
ResultInvalidSubjectSize()41 inline Result ResultInvalidSubjectSize()
42 {
43 return nn::MakePermanentResult(
44 nn::Result::SUMMARY_INVALID_ARGUMENT,
45 nn::Result::MODULE_NN_NEWS,
46 DESCRIPTION_INVALID_SUBJECT_SIZE);
47 }
48
49 /*!
50 :category Result
51 @class nn::news::ResultInvalidMessageSize
52 @brief 本文のサイズが大きすぎます.
53 */
ResultInvalidMessageSize()54 inline Result ResultInvalidMessageSize()
55 {
56 return nn::MakePermanentResult(
57 nn::Result::SUMMARY_INVALID_ARGUMENT,
58 nn::Result::MODULE_NN_NEWS,
59 DESCRIPTION_INVALID_MESSAGE_SIZE);
60 }
61
62 /*!
63 :category Result
64 @class nn::news::ResultInvalidPictureSize
65 @brief 画像のサイズが大きすぎます.
66 */
ResultInvalidPictureSize()67 inline Result ResultInvalidPictureSize()
68 {
69 return nn::MakePermanentResult(
70 nn::Result::SUMMARY_INVALID_ARGUMENT,
71 nn::Result::MODULE_NN_NEWS,
72 DESCRIPTION_INVALID_PICTURE_SIZE);
73 }
74
75 /*!
76 :category Result
77 @class nn::news::ResultInvalidPicture
78 @brief 画像が不正です.
79 */
ResultInvalidPicture()80 inline Result ResultInvalidPicture()
81 {
82 return nn::MakePermanentResult(
83 nn::Result::SUMMARY_INVALID_ARGUMENT,
84 nn::Result::MODULE_NN_NEWS,
85 DESCRIPTION_INVALID_PICTURE);
86 }
87
88 } // end of namespace user
89 } // end of namespace CTR
90 } // end of namespace news
91 } // end of namespace nn
92
93 #endif /* NN_NEWS_CTR_USER_USERRESULT_H_ */
94
95