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