Skip to content

Commit 29c2403

Browse files
committed
DConnectSDKのリファレンスを追記。
1 parent 04cf601 commit 29c2403

13 files changed

Lines changed: 329 additions & 16 deletions

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectApiEntity.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,30 @@
1414

1515
typedef BOOL (^DConnectApiFunction)(DConnectRequestMessage*, DConnectResponseMessage*);
1616

17+
/*!
18+
@class DConnectApiEntity
19+
@brief Device Connect APIを実装するオブジェクト。
20+
*/
1721
@interface DConnectApiEntity : NSObject<NSCopying>
22+
23+
/*!
24+
@brief APIのメソッド名。
25+
*/
1826
@property (nonatomic, strong) NSString *method;
27+
28+
/*!
29+
@brief APIのパス名。
30+
*/
1931
@property (nonatomic, strong) NSString *path;
32+
33+
/*!
34+
@brief APIを実装するブロック。
35+
*/
2036
@property (nonatomic, strong) DConnectApiFunction api;
37+
38+
/*!
39+
@brief APIの仕様を定義するオブジェクトのインスタンス。
40+
*/
2141
@property (nonatomic, strong) DConnectApiSpec *apiSpec;
2242

2343
@end

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectApiSpec.h

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,66 @@
1212
#import <DConnectSDK/DConnectRequestMessage.h>
1313
#import <DConnectSDK/DConnectSpecConstants.h>
1414

15+
/*!
16+
@class DConnectApiSpec
17+
@brief Device Connect API仕様。
18+
*/
1519
@interface DConnectApiSpec : NSObject<NSCopying>
1620

21+
/*!
22+
@brief API種別。
23+
*/
1724
@property(nonatomic) DConnectSpecType type;
1825

26+
/*!
27+
@brief APIメソッド。
28+
*/
1929
@property(nonatomic) DConnectSpecMethod method;
2030

31+
/*!
32+
@brief API名。
33+
*/
2134
@property(nonatomic, strong) NSString *apiName;
2235

36+
/*!
37+
@brief プロファイル名。
38+
*/
2339
@property(nonatomic, strong) NSString *profileName;
2440

41+
/*!
42+
@brief インターフェース名。
43+
*/
2544
@property(nonatomic, strong) NSString *interfaceName;
2645

46+
/*!
47+
@brief アトリビュート名。
48+
*/
2749
@property(nonatomic, strong) NSString *attributeName;
2850

29-
// DConnectParamSpecの配列
51+
52+
/*!
53+
@brief リクエストパラメータ仕様のリスト。
54+
55+
DConnectParamSpecの配列で表現される。
56+
*/
3057
@property(nonatomic, strong) NSArray *requestParamSpecList;
3158

59+
/*!
60+
@brief APIのパスを取得する。
61+
@return APIのパスを示す文字列。
62+
*/
3263
- (NSString *) path;
3364

65+
/*!
66+
@brief APIのパスを設定する。
67+
@param[in] path APIのパスを示す文字列。
68+
*/
3469
- (void) setPath: (NSString *) path;
3570

71+
/*!
72+
@brief アプリケーションからのリクエストを検証する。
73+
@return リクエストが仕様通りであると判断された場合はYES、そうでない場合はNO
74+
*/
3675
- (BOOL) validate: (DConnectRequestMessage *) request;
3776

3877
@end

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectAvailabilityProfile.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ extern NSString *const DConnectAvailabilityProfileName;
2121

2222
extern NSString *const DConnectAvailabilityProfileParamName;
2323

24+
/*!
25+
@class DConnectAvailabilityProfile
26+
@brief Availabilityプロファイル。
27+
28+
Managerと通信可能であることを確認するためのプロファイル。
29+
プラグイン側では実装する必要はない。
30+
*/
2431
@interface DConnectAvailabilityProfile : DConnectProfile
2532

2633
- (id) init;

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectPluginSpec.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#import <Foundation/Foundation.h>
1111
#import "DConnectProfileSpec.h"
1212

13+
/*!
14+
@class DConnectPluginSpec
15+
@brief プラグインのサポートする仕様を保持するクラス。
16+
17+
プラグインのサポートするプロファイルのリストを持つ。
18+
*/
1319
@interface DConnectPluginSpec : NSObject
1420

1521
/*!

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectProfileProvider.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#import <Foundation/Foundation.h>
1111
#import <DConnectSDK/DConnectProfile.h>
1212

13+
/*!
14+
@class DConnectProfileProvider
15+
@brief Device Connect プロファイルプロバイダー。
16+
*/
1317
@interface DConnectProfileProvider : NSObject
1418

1519
/*!

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectProfileSpec.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,32 @@
1212
#import "DConnectSpecConstants.h"
1313
#import "DConnectProfileSpec.h"
1414

15+
/*!
16+
@class DConnectProfileSpec
17+
@brief プロファイルについての仕様を保持するクラス。
18+
19+
当該プロファイル上で定義されるAPIの仕様のリストを持つ。
20+
*/
1521
@interface DConnectProfileSpec : NSObject
1622

23+
/*!
24+
@brief API仕様定義ファイルの元データ。
25+
*/
1726
@property (nonatomic, strong) NSDictionary * bundle;
1827

28+
/*!
29+
@brief API名。
30+
*/
1931
@property (nonatomic, strong) NSString * api;
2032

33+
/*!
34+
@brief プロファイル名.
35+
*/
2136
@property (nonatomic, strong) NSString * profile;
2237

38+
/*!
39+
@brief 当該プロファイルのもつDConnectApiSpec一覧。
40+
*/
2341
@property (nonatomic, strong) NSMutableDictionary * allApiSpecs; // Map<String, Map<Method, DConnectApiSpec>>
2442

2543

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectService.h

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,73 @@ extern NSString * const DConnectServiceAnonymousOrigin;
1717
extern NSString * const DConnectServiceInnerType;
1818
extern NSString * const DConnectServiceInnerTypeHttp;
1919

20-
2120
@class DConnectService;
2221

22+
/*!
23+
@brief DConnectServiceの状態変更通知を受信するリスナー。
24+
*/
2325
@protocol OnStatusChangeListener <NSObject>
2426

27+
/*!
28+
@brief DConnectServiceの状態が変更された時に呼び出される。
29+
@param[in] 状態の変更されたDConnectServiceのインスタンス。
30+
*/
2531
- (void) didStatusChange: (DConnectService *)service;
2632

2733
@end
2834

35+
/*!
36+
@class DConnectService
37+
@brief Device Connect APIサービス。
38+
*/
2939
@interface DConnectService : DConnectProfileProvider<DConnectServiceInformationProfileDataSource>
3040

3141
/*!
32-
@brief サービスID.
42+
@brief サービスID
3343
*/
3444
@property(nonatomic, strong) NSString *serviceId;
3545

46+
/*!
47+
@brief サービス名。
48+
*/
3649
@property(nonatomic, strong) NSString *name;
3750

51+
/*!
52+
@brief ネットワーク種別。
53+
*/
3854
@property(nonatomic, strong) NSString *networkType;
3955

56+
/*!
57+
@brief オンライン状態。
58+
59+
ホストデバイスと接続されているかどうかを示すフラグ。
60+
*/
4061
@property(readwrite, getter=online, setter=setOnline:) BOOL online;
4162

63+
/*!
64+
@brief コンフィグ。
65+
66+
サービスごとに任意に設定可能な文字列。
67+
*/
4268
@property(nonatomic, strong) NSString *config;
4369

70+
/*!
71+
@brief 当該サービスの状態変更を通知するリスナー。
72+
*/
4473
@property(nonatomic, weak) id<OnStatusChangeListener> statusListener;
4574

46-
75+
/*!
76+
@brief DConnectServiceのインスタンスを生成する。
77+
@param[in] serviceId サービスID。
78+
@param[in] plugin DConnectDevicePluginのインスタンス。
79+
@return DConnectServiceのインスタンス。
80+
*/
4781
- (instancetype) initWithServiceId: (NSString *)serviceId plugin: (id) plugin;
4882

83+
/*!
84+
@brief リクエスト受信時に実行される。
85+
@return 同期的にリクエストを処理する場合はYES、それ以外の場合(非同期処理を行う場合)はNO。後者の場合は、非同期処理完了後に明示的にレスポンス送信処理を実行すること。
86+
*/
4987
- (BOOL) didReceiveRequest: (DConnectRequestMessage *) request response: (DConnectResponseMessage *)response;
5088

5189
@end

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectServiceListViewController.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,30 @@
1111
#import <DConnectSDK/DConnectSystemProfile.h>
1212
#import <DConnectSDK/DConnectServiceListener.h>
1313

14+
/*!
15+
@class DConnectServiceListViewController
16+
@brief DeviceConnectサービス一覧を表示するUI。
17+
*/
1418
@interface DConnectServiceListViewController : UITableViewController<DConnectServiceListener>
1519

20+
/*!
21+
@brief Systemプロファイルのデリゲート。
22+
*/
1623
@property (nonatomic, weak) id<DConnectSystemProfileDelegate> delegate;
1724

25+
/*!
26+
@brief サービス追加ボタン。
27+
*/
1828
@property (weak, nonatomic) IBOutlet UIBarButtonItem *addButton;
1929

30+
/*!
31+
@brief サービス追加または削除の完了ボタン。
32+
*/
2033
@property (weak, nonatomic) IBOutlet UIBarButtonItem *finishButton;
2134

35+
/*!
36+
@brief サービス削除ボタン。
37+
*/
2238
@property (weak, nonatomic) IBOutlet UIBarButtonItem *removeButton;
2339

2440
@end

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectServiceListener.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,28 @@
99

1010
@class DConnectService;
1111

12+
/*!
13+
@brief サービス一覧の状態変更通知を受信するリスナー。
14+
*/
1215
@protocol DConnectServiceListener <NSObject>
1316
@optional
1417

18+
/*!
19+
@brief サービスが追加された時に実行される。
20+
@param[in] 追加されたサービス。
21+
*/
1522
- (void) didServiceAdded: (DConnectService *) service;
1623

24+
/*!
25+
@brief サービスが削除された時に実行される。
26+
@param[in] 削除されたサービス。
27+
*/
1728
- (void) didServiceRemoved: (DConnectService *) service;
1829

30+
/*!
31+
@brief サービスの状態が変更された時に実行される。
32+
@param[in] 状態の変更されたサービス。
33+
*/
1934
- (void) didStatusChange: (DConnectService *) service;
2035

2136
@end

dConnectSDK/dConnectSDKForIOS/DConnectSDK/DConnectSDK/DConnectServiceManager.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#import <DConnectSDK/DConnectServiceProvider.h>
1313
#import <DConnectSDK/DConnectPluginSpec.h>
1414

15+
/*!
16+
@class DConnectServiceManager
17+
@brief 当該プラグインのDeviceConnectサービスを管理する。
18+
*/
1519
@interface DConnectServiceManager : DConnectServiceProvider<OnStatusChangeListener>
1620

1721

@@ -29,6 +33,10 @@
2933
*/
3034
+ (DConnectServiceManager *)sharedForKey: (NSString *)key;
3135

36+
/*!
37+
@brief プラグインを対応づける。
38+
@param[in] plugin DConnectDevicePluginのインスタンス。
39+
*/
3240
- (void) setPlugin: (id) plugin;
3341

3442
@end

0 commit comments

Comments
 (0)