CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
session_ICommunityInfo.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 
18 namespace nn
19 {
20 namespace pia
21 {
22 namespace common
23 {
24 class String;
25 class DateTime;
26 }
27 }
28 }
29 
30 namespace nn
31 {
32 namespace pia
33 {
34 namespace session
35 {
36 
37 /*!
38  @brief コミュニティの情報へのインターフェースです。
39  */
41 {
42 public:
44  {
45  }
46  virtual ~ICommunityInfo()
47  {
48  }
49 
50  /*!
51  @brief コミュニティの ID を取得します。
52  @return コミュニティの ID を返します。
53  */
54  virtual uint32_t GetCommunityId() const = 0;
55 
56  /*!
57  @brief 公式コミュニティであるかどうかを取得します。
58  @return
59  */
60  virtual bool IsOfficialCommunity() const = 0;
61 
62  /*!
63  @brief パスワードで参加制限されているかどうかを確認します。
64  @return パスワードで参加制限されている場合は true を返します。
65  */
66  virtual bool IsRestrictedByPassword() const = 0;
67 
68  /*!
69  @brief 参加開始日時を取得します。
70  @return 参加開始日時を返します。
71  */
72  virtual const common::DateTime& GetParticipationStartDate() = 0;
73 
74  /*!
75  @brief 参加終了日時を取得します。
76  @return 参加終了日時を返します。
77  */
78  virtual const common::DateTime& GetParticipationEndDate() = 0;
79 
80  /*!
81  @brief コミュニティに関連づけられたセッションの数を取得します。
82  @return コミュニティに関連づけられたセッションの数を返します。
83  */
84  virtual uint32_t GetRelatedSessionCount() const = 0;
85 
86  /*!
87  @brief コミュニティの属性を取得します。
88  @param[in] idx 取得する属性のインデックス。
89  @param[out] pAttribute 指定されたインデックスのコミュニティの属性格納先のポインタ。
90  @return 正常に情報を取得できた場合、成功の Result が返ります。
91  @retval ResultInvalidArgument 引数が不正です。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
92  @retval ResultInvalidState データを取得できる状態ではありません。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
93  */
94  virtual Result GetAttribute(uint8_t idx, uint32_t* pAttribute) const = 0;
95 
96  /*!
97  @brief コミュニティーのオーナーのプリンシパル ID を取得します。
98  */
99  virtual PrincipalId GetOwnerPrincipalId() const = 0;
100 
101  /*!
102  @brief コミュニティに参加している人数を取得します。
103  @return コミュニティに参加している人数を返します。
104  */
105  virtual uint16_t GetCurrentParticipantNum() const = 0;
106 
107  /*!
108  @brief コミュニティに参加できる最大人数を取得します。
109  @return コミュニティに参加できる最大人数を返します。
110  */
111  virtual uint16_t GetMaxParticipantNum() const = 0;
112 
113  /*!
114  @brief コミュニティに参加できる最少人数を取得します。
115  @return コミュニティに参加できる最少人数を返します。
116  */
117  virtual uint16_t GetMinParticipantNum() const = 0;
118 
119  /*!
120  @brief コミュニティの説明文字列を取得します。
121  @return コミュニティの説明文字列が返ります。
122  */
123  virtual const common::String& GetDescription() const = 0;
124 
125  /*!
126  @brief コミュニティのアプリケーション定義データを取得します。
127  @param[out] pBuffer コミュニティのアプリケーション定義データのコピー用バッファのポインタ。
128  @param[in] size コミュニティのアプリケーション定義データのコピー用バッファのサイズ。
129  @return 正常に情報を取得できた場合、成功の Result が返ります。
130  @retval ResultInvalidArgument 引数が不正です。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
131  @retval ResultInvalidState データを取得できる状態ではありません。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
132  @if CTR_DOC
133  @retval ResultNoData 取得できるデータがありませんでした。ローカル通信時のみ返ります。アプリケーションで適切にハンドリングしてください。
134  @endif
135  */
136  virtual Result GetApplicationData(void* pBuffer, uint32_t size) = 0;
137 
138  /*!
139  @brief コミュニティのアプリケーション定義データの長さを取得します。
140  @param[out] pSize コミュニティのアプリケーション定義データの長さ格納先のポインタ。
141  @return 正常に情報を取得できた場合、成功の Result が返ります。
142  @retval ResultInvalidArgument 引数が不正です。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
143  @retval ResultInvalidState データを取得できる状態ではありません。プログラミングエラーです。このエラーが返らないようにソースコードを修正してください。
144  */
145  virtual Result GetApplicationDataSize(uint32_t* pSize) = 0;
146 };
147 }
148 }
149 } // end of namespace nn::pia::session