1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: cec_MessageBoxSystem.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: 47558 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_CEC_CTR_CEC_MESSAGE_BOX_SYSTEM_H_ 17 #define NN_CEC_CTR_CEC_MESSAGE_BOX_SYSTEM_H_ 18 19 20 #include <nn/cec/CTR/cec_Api.h> 21 #include <nn/cec/CTR/cec_Types.h> 22 #include <nn/cec/CTR/cec_MessageBox.h> 23 24 namespace nn { 25 namespace cec { 26 namespace CTR { 27 28 29 /* Please see man pages for details 30 31 32 33 */ 34 35 class MessageBoxSystem : public MessageBox 36 { 37 38 public: 39 40 explicit MessageBoxSystem(bool NoInitialize = false); 41 virtual ~MessageBoxSystem(); 42 43 44 // 45 // 46 47 u32 GetMessageBoxList(MessageBoxList& messageBoxList); 48 49 /* Please see man pages for details 50 51 52 53 54 55 */ 56 u32 GetMessageBoxTitleIdList(TitleId* titleIdList, MessageBoxFlag flag); 57 58 /* Please see man pages for details 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 */ 74 nn::Result CreateMessageBox_System( 75 const TitleId cecTitleId, const u32 privateId, 76 const char* hmacKey, 77 MessageBoxFlag flag, 78 size_t inboxSizeMax = CEC_INBOX_SIZE_DEFAULT, 79 size_t outboxSizeMax = CEC_OUTBOX_SIZE_DEFAULT, 80 size_t inboxMessNumMax = CEC_INBOX_MESSNUM_DEFAULT, 81 size_t outboxMessNumMax = CEC_OUTBOX_MESSNUM_DEFAULT, 82 size_t messageSizeMax = CEC_MESSSIZEMAX_DEFAULT 83 ); 84 85 /* Please see man pages for details 86 87 88 89 90 91 92 93 94 */ 95 nn::Result GetMessageBoxDataDirect(TitleId cecTitleId, const u32 datatype, void* dataBuf, const size_t dataBufSize); 96 97 nn::Result DeleteAllBoxes(); 98 void SetLastOpenedDate(const nn::fnd::DateTimeParameters& dateTime); 99 nn::fnd::DateTimeParameters GetLastOpenedDate() const; 100 nn::fnd::DateTimeParameters GetLastReceivedDate() const; 101 102 nn::Result DeleteOldestMessageBox(MessageBoxFlag flag); 103 104 /* Please see man pages for details 105 106 107 108 109 */ 110 virtual nn::Result OpenMessageBoxForce(const TitleId cecTitleId); 111 112 nn::Result SetMessageBoxFlag(const MessageBoxFlag flag); 113 114 nn::Result SetMessageBodyDirect(const TitleId cecTitleId, const CecBoxType boxType, const MessageId& messageId, const void* dataBody, const size_t dataBodyLen); 115 size_t GetMessageBodySizeDirect(const TitleId cecTitleId, const CecBoxType boxType, const MessageId& messageId) const; 116 nn::Result GetMessageBodyDirect(const TitleId cecTitleId, const CecBoxType boxType, const MessageId& messageId, void* dataBody, const size_t dataBodyLen) const; 117 }; 118 119 } // namespace CTR 120 } // namespace cec 121 } // namespace nn 122 123 #endif //NN_CEC_CTR_CEC_MESSAGE_BOX_SYSTEM_H_ 124 125