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_MESSAGE_SIZE, //!< 本文のサイズが大きすぎます.
30 DESCRIPTION_INVALID_PICTURE_SIZE, //!< 画像のサイズが大きすぎます.
31 DESCRIPTION_INVALID_PICTURE, //!< 画像が不正です.
32 DESCRIPTION_MAX
33 };
34
35 /*!
36 :category Result
37 @class nn::news::ResultInvalidMessageSize
38 @brief 本文のサイズが大きすぎます.
39 */
ResultInvalidMessageSize()40 inline Result ResultInvalidMessageSize()
41 {
42 return nn::MakeStatusResult(
43 nn::Result::SUMMARY_INVALID_ARGUMENT,
44 nn::Result::MODULE_NN_NEWS,
45 DESCRIPTION_INVALID_MESSAGE_SIZE);
46 }
47
48 /*!
49 :category Result
50 @class nn::news::ResultInvalidPictureSize
51 @brief 画像のサイズが大きすぎます.
52 */
ResultInvalidPictureSize()53 inline Result ResultInvalidPictureSize()
54 {
55 return nn::MakeStatusResult(
56 nn::Result::SUMMARY_INVALID_ARGUMENT,
57 nn::Result::MODULE_NN_NEWS,
58 DESCRIPTION_INVALID_PICTURE_SIZE);
59 }
60
61 /*!
62 :category Result
63 @class nn::news::ResultInvalidPicture
64 @brief 画像が不正です.
65 */
ResultInvalidPicture()66 inline Result ResultInvalidPicture()
67 {
68 return nn::MakeStatusResult(
69 nn::Result::SUMMARY_INVALID_ARGUMENT,
70 nn::Result::MODULE_NN_NEWS,
71 DESCRIPTION_INVALID_PICTURE);
72 }
73
74 } // end of namespace user
75 } // end of namespace CTR
76 } // end of namespace news
77 } // end of namespace nn
78
79 #endif /* NN_NEWS_CTR_USER_USERRESULT_H_ */
80
81