CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
inet_NexSessionSearchCriteriaOwner.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 namespace nn
24 {
25 namespace pia
26 {
27 namespace inet
28 {
29 
30 /*!
31  @brief マッチメイクセッションのオーナー(通常はセッションホストと同じ)を検索条件に指定するクラスです。
32  @details 検索結果として得られるセッションの最大数は SetResultRange で指定する値になりますが、
33  nn::pia::session::Session::CreateInstance 呼び出し時に指定する
34  nn::pia::session::Session::Setting 構造体の browsedSessionInfoListNum 以下の値を
35  指定する必要があります。
36 
37  @see nn::pia::session::SessionSearchCriteria
38  */
40 {
41 public:
42  /*!
43  @brief デフォルトコンストラクタ。
44  */
46 
47  /*!
48  @brief コンストラクタ。
49  @param[in] ownerPrincipalId 検索条件として指定するオーナーのプリンシパル ID。
50  @param[in] resultOffset 検索条件にマッチしたエントリーリストから検索結果として取得するエントリー群の開始位置。
51  @param[in] resultSize 検索条件にマッチしたエントリーリストから検索結果として取得するエントリー数。
52  session::Session::Setting 構造体の browsedSessionInfoListNum 以下、かつSearchCriteriaResultSizeMax 以下の値である必要があります。
53  */
54  NexSessionSearchCriteriaOwner(PrincipalId ownerPrincipalId, uint32_t resultOffset, uint32_t resultSize);
55 
56  /*!
57  @brief デストラクタ。
58  */
60 
61  /*!
62  @brief 検索条件として指定するオーナーのプリンシパル ID をセットします。
63  @param[in] ownerPrincipalId 検索条件として指定するオーナーのプリンシパル ID。
64  */
65  void SetOwnerPrincipalId(PrincipalId ownerPrincipalId);
66 
67  /*!
68  @brief 検索結果の取得範囲を指定します。
69  @details offset に 0xFFFFFFFF を指定すると、検索結果をランダムに並び替えた上で指定されたエントリー数を取得するように振る舞います。
70  @param[in] offset 検索条件にマッチしたエントリーリストから検索結果として取得するエントリー群の開始位置。
71  @param[in] size 検索条件にマッチしたエントリーリストから検索結果として取得するエントリー数。
72  session::Session::Setting 構造体の browsedSessionInfoListNum 以下、かつSearchCriteriaResultSizeMax 以下の値である必要があります。
73 
74  @return 処理に成功すれば、成功の Result が返されます。失敗した場合、以下の Result を返します。
75  @retval nn::pia::ResultInvalidArgument 引数の値が範囲外です。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
76  */
77  virtual Result SetResultRange(uint32_t offset, uint32_t size);
78 
79  /*!
80  @brief 代入演算子です。
81  @param[in] rhs 代入するオブジェクトです。
82  @return 本オブジェクトへの参照。
83  */
85 
86  /*!
87  @brief 設定をコピーします。
88  @param[in] rhs コピー元のオブジェクトです。
89  */
90  void Copy(const NexSessionSearchCriteriaOwner& rhs);
91 
92  /*!
93  @brief コピーコンストラクタ。
94  @param[in] rhs コピー元のオブジェクトです。
95  */
97 
98  /*!
99  @cond PRIVATE
100  */
101  PrincipalId GetOwnerPrincipalId() const;
102  //! @endcond
103 
104  /*!
105  @brief 検索条件をリセットします。
106  */
107  virtual void Reset();
108 
109 private:
110  PrincipalId m_OwnerPrincipalId;
111 };
112 }
113 }
114 } // end of namespace nn::pia::inet
115 
116 #endif