CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
inet_NexSessionSearchCriteriaParticipant.h
1 /*--------------------------------------------------------------------------------*
2  Copyright (C)Nintendo All rights reserved.
3 
4  These coded instructions, statements, and computer programs contain proprietary
5  information of Nintendo and/or its licensed developers and are protected by
6  national and international copyright laws. They may not be disclosed to third
7  parties or copied or duplicated in any form, in whole or in part, without the
8  prior written consent of Nintendo.
9 
10  The content herein is highly confidential and should be handled accordingly.
11  *--------------------------------------------------------------------------------*/
12 
13 
14 #pragma once
15 
16 #include <nn/pia/inet/inet_Definitions.h>
17 
18 #if NN_PIA_ENABLE_NEX
19 
20 #include <nn/pia/inet/inet_NexSessionTypes.h>
21 #include <nn/pia/session/session_SessionSearchCriteria.h>
22 
23 #if NN_PIA_NINTENDOSDK
24 #include <nn/account.h>
25 #endif
26 
27 namespace nn
28 {
29 namespace pia
30 {
31 namespace inet
32 {
33 
34 /*!
35  @brief プリンシパル ID をセッションの検索条件として指定するクラスです。
36  @details 指定したプリンシパル ID のステーションが参加しているセッションを検索します。
37  検索結果として得られるセッションの最大数は nn::pia::session::Session::CreateInstance 呼び出し時に
38  指定する nn::pia::session::Session::Setting 構造体の browsedSessionInfoListNum の値になります。
39 
40  @see nn::pia::session::SessionSearchCriteria
41  */
43 {
44 public:
45  /*!
46  @brief デフォルトコンストラクタ。
47  */
49 
50  /*!
51  @brief デストラクタ。
52  */
54 
55  /*!
56  @brief 検索条件として指定する相手のプリンシパル ID をセットします。
57  @param[in] idList 検索条件として指定する相手のプリンシパル ID のリスト。
58  @param[in] idListSize 検索条件として指定する相手のプリンシパル ID のリストサイズ。ParticipantArraySizeMax 以下である必要があります。
59  @return 検索条件の指定に成功すれば、成功の Result が返されます。
60  @retval nn::pia::ResultInvalidArgument リストが NULL、または値の個数が範囲外です。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
61  */
62  Result SetParticipantPrincipalId(const PrincipalId* idList, uint32_t idListSize);
63 
64 #if NN_PIA_NINTENDOSDK
65  /*!
66  @if NIN_DOC
67  @brief 検索条件として指定する相手のネットワークサービスアカウント ID をセットします。
68  @param[in] idList 検索条件として指定する相手のネットワークサービスアカウント ID のリスト。
69  @param[in] idListSize 検索条件として指定する相手のネットワークサービスアカウント ID のリストサイズ。ParticipantArraySizeMax 以下である必要があります。
70  @return 検索条件の指定に成功すれば、成功の Result が返されます。
71  @retval nn::pia::ResultInvalidArgument リストが NULL、または値の個数が範囲外です。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
72  @endif
73  */
74  Result SetParticipantPrincipalIdByNetworkServiceAccountId(nn::account::NetworkServiceAccountId* idList, uint32_t idListSize);
75 #endif
76 
77  /*!
78  @brief 検索条件として指定するブロックリスト設定をセットします。
79  @param[in] isMyBlockListUsed 自分がブロックリストに登録しているユーザーをチェックするかどうか。デフォルトは true です。
80  @param[in] isOthersBlockListUsed 自分をブロックリストに登録しているユーザをチェックするかどうか。デフォルトは true です。
81  */
82  void SetBlockListOption(bool isMyBlockListUsed, bool isOthersBlockListUsed);
83 
84  /*!
85  @brief 検索結果にアプリケーション定義データを含めるかどうかをセットします。
86  @details アプリケーション定義データを必要としない場合は、サーバー負荷軽減のため、含めてはいけません。
87  @param[in] isEnabled 検索結果にアプリケーション定義データを含めるかどうか。デフォルトは false です。
88  */
89  void SetApplicationDataEnabled(bool isEnabled);
90 
91  /*!
92  @cond PRIVATE
93  */
94  const PrincipalId* GetParticipantPrincipalId() const;
95  uint32_t GetParticipantPrincipalIdSize() const;
96  bool IsNetworkServiceAccountIdUsed() const;
97  bool IsMyBlockListUsed() const;
98  bool IsOthersBlockListUsed() const;
99  bool IsApplicationDataEnabled() const;
100  //! @endcond
101 
102  /*!
103  @brief 代入演算子です。
104  @param[in] rhs 代入するオブジェクトです。
105  @return 本オブジェクトへの参照。
106  */
108 
109  /*!
110  @brief 設定をコピーします。
111  @param[in] rhs コピー元のオブジェクトです。
112  */
113  void Copy(const NexSessionSearchCriteriaParticipant& rhs);
114 
115  /*!
116  @brief コピーコンストラクタ。
117  @param[in] rhs コピー元のオブジェクトです。
118  */
120 
121  /*!
122  @brief 検索条件をリセットします。
123  */
124  virtual void Reset();
125 
126 protected:
127  PrincipalId m_ParticipantPrincipalId[ParticipantArraySizeMax];
128  uint32_t m_ParticipantPrincipalIdNum;
129  bool m_IsNetworkServiceAccoundIdUsed;
130  bool m_IsMyBlockListUsed;
131  bool m_IsOthersBlockListUsed;
132  bool m_IsApplicationDataEnabled;
133 
134 private:
135  // SetResultRange は封印。
136  virtual Result SetResultRange(uint32_t offset, uint32_t size);
137 };
138 }
139 }
140 } // end of namespace nn::pia::inet
141 
142 #endif