1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     ubl_Api.h
4 
5   Copyright (C)2010 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: 17231 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef UBL_API_H_
17 #define UBL_API_H_
18 
19 #include<nn/fs.h>
20 #include<nn/fnd.h>
21 #include<nn/Result.h>
22 
23 namespace nn {
24 namespace ubl {
25 
26 /*=======================================================================*
27     関数プロトタイプ宣言
28  *=======================================================================*/
29 
30 /*!--------------------------------------------------------------------------*
31   @brief        UBLライブラリを初期化処理を行います
32                 ライブラリ利用前に一度呼び出す必要があります
33                 あらかじめDevMenuで共有拡張セーブデータ領域を初期化しておかないと、エラーになります
34 
35   @return       処理の結果が返ってきます
36  *---------------------------------------------------------------------------*/
37 nn::Result Initialize( void );
38 
39 /*!--------------------------------------------------------------------------*
40   @brief        UBLライブラリを終了します
41  *---------------------------------------------------------------------------*/
42 void Finalize( void );
43 
44 /*!--------------------------------------------------------------------------*
45   @brief        受信拒否設定をクリアーした後、拡張セーブデータ領域に書き出します
46 
47   @return       クリアー処理に対する処理の結果が返ります
48  *---------------------------------------------------------------------------*/
49 nn::Result Clear( void );
50 
51 /*!--------------------------------------------------------------------------*
52   @brief        指定IDが受信拒否設定に存在するか調べます
53 
54                 現在、タイトルIDとUGCデータIDは無視されます。
55                 これらの対応は将来行われる予定です。
56 
57   @param[in]    authorId 検索する作者ID
58   @param[in]    titleId  検索するタイトルID
59   @param[in]    dataId   検索するUGCデータID
60 
61   @return       指定した要素が合致したならtrue、合致しなければfalse
62  *---------------------------------------------------------------------------*/
63 bool IsExist( u64 authorId , u32 titleId , u64 dataId);
64 
65 /*!--------------------------------------------------------------------------*
66   @brief        受信拒否設定に登録されている作者の総数を返します
67 
68   @return       受信拒否設定に登録されている作者の総数
69  *---------------------------------------------------------------------------*/
70 u32 GetTotalLocalUser( void );
71 
72 /*!--------------------------------------------------------------------------*
73   @brief        CTR本体のユニークIDを返します
74 
75   @return       CTR本体のユニークID
76  *---------------------------------------------------------------------------*/
77 u64 GetUserId( void );
78 
79 /*!--------------------------------------------------------------------------*
80   @brief        ユーザー名を取得します
81 
82   @param[out]   name 取得したユーザ名を格納するメモリへのポインタ
83 
84   @return       ユーザー名にNGワードが含まれている場合にはtrue
85  *---------------------------------------------------------------------------*/
86 bool GetUserName( wchar_t *name );
87 
88 /*!--------------------------------------------------------------------------*
89   @brief        64ビット長のハッシュデータを取得します
90 
91   @param[in]    inputBuffer 入力データへのポインタ
92   @param[in]    inputSize   入力データのサイズ
93 
94   @return       64ビットのハッシュデータ
95  *---------------------------------------------------------------------------*/
96 u64 GetHashValue( const void *inputBuffer , size_t inputSize);
97 
98 /*!--------------------------------------------------------------------------*
99   @brief        指定されたIDと日時を受信拒否設定に登録し、拡張セーブデータ領域に書き出します
100 
101   @param[in]    id 登録する作者ID
102   @param[in]    dt 登録日時
103 
104   @return       登録処理に対する処理の結果が返ります
105  *---------------------------------------------------------------------------*/
106 nn::Result Entry( u64 id, nn::fnd::DateTime *dt );
107 
108 } // end of namespace ubl
109 } // end of namespace nn
110 
111 #endif /* UBL_API_H_ */
112