CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
inet_NexNetworkFactory.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/transport/transport_NetworkFactory.h>
22 
23 namespace nn
24 {
25 namespace pia
26 {
27 namespace inet
28 {
29 
30 /*!
31  @brief NEX ライブラリ(インターネット通信)を利用したネットワークに必要なクラスを生成するためのクラスです(ファクトリパターン)。
32 
33  @details @ref nn::pia::transport::Transport や @ref nn::pia::session::Session に、
34  NexNetworkFactory クラスを設定することで NEX ライブラリに合わせたネットワーク関連処理(送受信、セッション管理など)が
35  行われるようになります。
36 
37  @see nn::pia::transport::Transport::Setting, nn::pia::session::Session::Setting
38  */
40 {
41 public:
42  /*!
43  @cond PRIVATE
44  */
45 
46  /*!
47  @name 初期化終了処理
48  @{
49  */
50 
51  /*!
52  @brief デフォルトコンストラクタ
53  */
55  {
56  }
57 
58  /*!
59  @brief デストラクタ
60  */
61  virtual ~NexNetworkFactory()
62  {
63  }
64 
65  /*!
66  end of name 初期化終了処理
67  @}
68  */
69 
70  /*!
71  @brief 最大参加可能ステーション数を返します。
72  */
73  virtual uint16_t GetMaxStationNum() const
74  {
75  return 16;
76  }
77 
78  virtual transport::NetworkFactory* CreateSelf();
79 
80  /*!
81  @brief InputStream を生成します。
82  */
83  virtual nn::pia::common::IPacketInput* CreateInputStream();
84 
85  /*!
86  @brief OutputStream を生成します。
87  */
88  virtual nn::pia::common::IPacketOutput* CreateOutputStream();
89 
90  /*!
91  @brief ConnectStationJob を生成します。
92  */
93  virtual nn::pia::transport::ConnectStationJob* CreateConnectStationJob();
94 
95  /*!
96  @brief DisconnectStationJob を生成します。
97  */
98  virtual nn::pia::transport::DisconnectStationJob* CreateDisconnectStationJob();
99 
100  /*!
101  @brief CreateMeshJob を生成します。
102  */
103  virtual nn::pia::common::StepSequenceJob* CreateCreateMeshJob();
104 
105  /*!
106  @brief JoinMeshJob を生成します。
107  */
108  virtual nn::pia::common::StepSequenceJob* CreateJoinMeshJob();
109 
110  /*!
111  @brief LeaveMeshJob を生成します。
112  */
113  virtual nn::pia::common::StepSequenceJob* CreateLeaveMeshJob();
114 
115  /*!
116  @brief GenerateMatchmakeSystemPasswordJob を生成します。
117  */
118  virtual nn::pia::common::StepSequenceJob* CreateGenerateMatchmakeSystemPasswordJob();
119 
120  /*!
121  @brief ClearMatchmakeSystemPasswordJob を生成します。
122  */
123  virtual nn::pia::common::StepSequenceJob* CreateClearMatchmakeSystemPasswordJob();
124 
125  /*!
126  @brief Session 用 MatchmakeSessionSystemPassword の保持領域を生成します。
127  */
128  virtual common::String* CreateMatchmakeSessionSystemPassword();
129 
130  /*!
131  @brief 必要なプロトコルを構築します。
132  */
133  virtual Result CreateProtocols();
134 
135  /*!
136  @brief ProcessHostMigrationJob を生成します。
137  */
138  virtual nn::pia::common::StepSequenceJob* CreateProcessHostMigrationJob();
139 
140  /*!
141  @brief LeaveWithHostMigrationJob を生成します。
142  */
143  virtual nn::pia::common::StepSequenceJob* CreateLeaveWithHostMigrationJob();
144 
145  /*!
146  @brief KickoutManageJob を生成します。
147  */
148  virtual nn::pia::common::StepSequenceJob* CreateKickoutManageJob();
149 
150  /*!
151  @brief PacketHandler の具象インスタンスを構築します。
152  */
153  virtual transport::PacketHandler* CreatePacketHandler();
154 
155  /*!
156  @brief 署名が必要かどうか。
157  */
158  virtual bool IsSignatureRequired() const;
159 
160  /*!
161  @brief 署名設定の Storage を生成します。
162  */
163  virtual nn::pia::session::SignatureSettingStorage* CreateSignatureSettingStorage();
164 
165  /*!
166  @brief 複数候補親交代の使用を許すかどうか。
167  */
168  virtual bool IsMultiCandidatePermitted() const;
169 
170  /*!
171  @brief リレー通信機能の使用を許すかどうか。
172  */
173  virtual bool IsRelayConnectionPermitted() const;
174 
175  /*!
176  @brief ジョイントセッション機能の使用を許すかどうか。
177  */
178  virtual bool IsJointSessionPermitted() const;
179 
180  /*!
181  @brief MonitoringDataSender 派生クラスのインスタンスを生成します。
182  */
183  virtual common::MonitoringDataSender* CreateMonitoringDataSender();
184 
185 
186  /*!
187  @brief ネットワーク層におけるパケットのヘッダ部分の合計サイズを返します。単位はバイトです。
188  */
189  virtual uint32_t GetHeaderSize() const;
190 
191  /*!
192  @brief MissingStationHandler 具象インスタンスを構築します。
193  */
194  virtual transport::MissingStationHandler* CreateMissingStationHandler();
195 
196  /*!
197  @brief Session 用 CreateSessionJob を生成します。
198  */
199  virtual common::StepSequenceJob* CreateMatchCreateSessionJob();
200 
201 
202  /*!
203  @brief Session 用 AutoMatchmakeSessionJob を生成します。
204  */
205  virtual common::StepSequenceJob* CreateMatchAutoMatchmakeSessionJob();
206 
207 
208  /*!
209  @brief Session 用 BrowseMatchmakeSessionJob を生成します。
210  */
211  virtual common::StepSequenceJob* CreateMatchBrowseMatchmakeSessionJob();
212 
213 
214  /*!
215  @brief Session 用 JoinSessionJob を生成します。
216  */
217  virtual common::StepSequenceJob* CreateMatchJoinSessionJob();
218 
219 
220  /*!
221  @brief Session 用 LeaveSessionJob を生成します。
222  */
223  virtual common::StepSequenceJob* CreateMatchLeaveSessionJob();
224 
225 
226  /*!
227  @brief Session 用 DestroySessionJob を生成します。
228  */
229  virtual common::StepSequenceJob* CreateMatchDestroySessionJob();
230 
231  /*!
232  @brief ジョイントセッション機能用 JointSessionJob を生成します。
233  */
234  virtual common::StepSequenceJob* CreateJointSessionJob();
235 
236  /*!
237  @brief Session 用 UpdateSessionSetting を生成します。
238  */
239  virtual common::StepSequenceJob* CreateUpdateSessionSettingJob();
240 
241  /*!
242  @cond PRIVATE
243  @brief Session 用 CommunityManagementJob を生成します。
244  */
245  virtual common::StepSequenceJob* CreateCommunityManagementJob();
246  //! @endcond
247 
248  /*!
249  @brief Session 用 IMatchmakeSession を生成します。
250  */
251  virtual session::IMatchmakeSession* CreateMatchmakeSession();
252 
253  /*!
254  @brief Session 用 ISessionInfoList を生成します。
255  */
256  virtual session::ISessionInfoList* CreateSessionInfoList(uint16_t browseSessionInfoListNum);
257 
258  /*!
259  @brief Session 用 ICommunityInfoList を生成します。
260  */
261  virtual session::ICommunityInfoList* CreateCommunityInfoList(uint8_t browsedCommunityInfoListNum);
262 
263  /*!
264  @brief Session 用 MeshLayerController を生成します。
265  */
266  virtual session::MeshLayerController* CreateMatchMeshLayerController();
267 
268  /*!
269  @brief Bind() が必要かどうか。
270  */
271  virtual bool IsBindRequired() const;
272 
273  /*!
274  @brief サーバーが必要かどうか。
275  */
276  virtual bool IsServerRequired() const;
277 
278  /*!
279  @brief いっしょに遊んだプレイヤー履歴を記録可能かどうか。
280  */
281  virtual bool IsRecentPlayRecordPermitted() const;
282 
283  /*!
284  @brief 同じ端末から複数プレイヤーが参加可能かどうか。
285  */
286  virtual bool IsMultiplayerPermitted() const;
287 
288  /*!
289  @brief ホストマイグレーションモードを取得します。
290  */
291  virtual int32_t GetHostMigrationMode() const;
292 
293  /*!
294  @brief セッションの検索結果の最大数を取得します。
295  */
296  virtual uint16_t GetBrowseSessionInfoListSizeMax() const;
297 
298  /*!
299  @brief コミュニティの検索結果の最大数を取得します。
300  */
301  virtual uint8_t GetBrowseCommunityInfoListSizeMax() const;
302 
303  /*!
304  @brief MTU の最大値(UDP、IPv4 のヘッダのようなネットワーク層のヘッダサイズを含む)です。
305  */
306  virtual uint32_t GetMtuSizeMax() const;
307 
308  /*!
309  @brief MTU の最小値(UDP、IPv4 のヘッダのようなネットワーク層のヘッダサイズを含む)です。
310  */
311  virtual uint32_t GetMtuSizeMin() const;
312 
313  /*!
314  @brief 初期段階での RTT 計測パルス送信間隔のデフォルト値です。単位はミリ秒です。
315  */
316  virtual int GetDefaultRttInitialPulseInterval() const;
317 
318  /*!
319  @endcond
320  */
321 
322 protected:
323 private:
324 };
325 }
326 }
327 } // end of namespace nn::pia::inet
328 
329 #endif