CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
session_SessionSearchCriteria.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/session/session_Definitions.h>
17 #include <nn/pia/session/session_Types.h>
18 
19 namespace nn
20 {
21 namespace pia
22 {
23 namespace session
24 {
25 /*!
26  @brief セッションを検索する際に使用する検索条件の基底クラスです。
27  @details アプリケーションが本クラスのインスタンスを作成することはありません。 本クラスを継承したクラスを使用する必要があります。
28 
29 @if CTR_DOC
30  @see local::UdsSessionSearchCriteria
31 @endif
32 @if NIN_DOC
33  @see local::LdnSessionSearchCriteria
34 @endif
35  @see inet::NexSessionSearchCriteria
36  @see inet::NexSessionSearchCriteriaOwner
37  @see inet::NexSessionSearchCriteriaParticipant
38  @see lan::LanSessionSearchCriteria
39  */
41 {
42 public:
43  /*!
44  @cond PRIVATE
45  @brief 検索条件の種類。
46  */
47  enum SearchCriteriaKey
48  {
49  SearchCriteriaKey_Standard = 0, //!< 参加人数など標準の検索条件を指定します。
50  SearchCriteriaKey_OwnerPrincipalId, //!< オーナーのプリンシパル ID を検索条件に指定します。
51  SearchCriteriaKey_ParticipantPrincipalId, //!< ユーザーのプリンシパル ID を検索条件に指定します。
52  SearchCriteriaKey_SessionId //!< セッション ID を検索条件に指定します。
53  };
54  //! @endcond
55 
56  // デストラクタ。
57  virtual ~SessionSearchCriteria();
58 
59  /*!
60  @brief 検索結果の取得範囲を指定します。
61  @details インターネット通信時のみ offset に 0xFFFFFFFF を指定すると、検索結果をランダムに並び替えた上で
62  指定されたエントリー数を取得するように振る舞います。
63  @param[in] offset 検索条件にマッチしたエントリーリストから検索結果として取得するエントリー群の開始位置。
64  @param[in] size 検索条件にマッチしたエントリーリストから検索結果として取得するエントリー数。
65 
66  @return 処理に成功すれば、成功の Result が返されます。失敗した場合、以下の Result を返します。
67  @retval nn::pia::ResultInvalidArgument 引数の値が範囲外です。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
68  */
69  virtual Result SetResultRange(uint32_t offset, uint32_t size);
70 
71  /*!
72  @cond PRIVATE
73  */
74  uint32_t GetResultRangeOffset() const;
75  //!@endcond
76 
77  /*!
78  @cond PRIVATE
79  */
80  uint32_t GetResultRangeSize() const;
81  //!@endcond
82 
83  /*!
84  @cond PRIVATE
85  @brief 検索条件の種類を取得します。
86  */
87  SearchCriteriaKey GetKeyType() const;
88  //! @endcond
89 
90  /*!
91  @brief 設定をリセットします。
92  */
93  virtual void Reset();
94 
95  /*!
96  @cond PRIVATE
97  @brief デバッグに有用な情報をプリント。
98  */
99  virtual void Trace(uint64_t flag) const
100  {
101  NN_PIA_UNUSED(flag);
102  }
103  //! @endcond
104 
105 protected:
106  // コンストラクタ。
108 
109  void Copy(const SessionSearchCriteria& rhs);
110 
111  // 検索範囲
112  uint32_t m_ResultOffset;
113  uint32_t m_ResultSize;
114 
115  // 検索キーのタイプ
116  SearchCriteriaKey m_KeyType;
117 
118 private:
119  NN_PIA_DISALLOW_COPY(SessionSearchCriteria);
120 };
121 }
122 }
123 } // end of namespace session