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