File tree Expand file tree Collapse file tree
dConnectDevicePlugin/dConnectDeviceHost/dConnectDeviceHost/Classes
dConnectSDK/dConnectSDKForIOS/DConnectSDK Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010#import < DConnectSDK/DConnectFileManager.h>
1111#import < DConnectSDK/DConnectEventManager.h>
12- #import < DConnectSDK/DConnectMemoryCacheController.h>
1312#import < DConnectSDK/DConnectServiceManager.h>
1413
1514#import " DPHostDevicePlugin.h"
2221@implementation DPHostDevicePlugin
2322
2423+ (void ) initialize {
25- // イベントマネージャの準備
26- Class clazz = [DPHostDevicePlugin class ];
27- DConnectEventManager *eventMgr =
28- [DConnectEventManager sharedManagerForClass: clazz];
29- [eventMgr setController: [DConnectMemoryCacheController new ]];
3024}
3125
3226- (id ) init {
Original file line number Diff line number Diff line change @@ -50,10 +50,15 @@ - (id) initWithObject: (id) object {
5050 self.pluginVersionName = @" 1.0.0" ;
5151 self.pluginId = [md5Proc generateSignature: self .pluginName];
5252
53+ // DeviceConnectサービス管理クラスの初期化
5354 DConnectServiceManager *serviceManager = [DConnectServiceManager sharedForClass: [object class ]];
5455 [serviceManager setPlugin: self ];
5556 [self setServiceProvider: serviceManager];
5657
58+ // イベント管理クラスの初期化
59+ id <DConnectEventCacheController> ctrl = [self eventCacheController ];
60+ [[DConnectEventManager sharedManagerForClass: [self class ]] setController: ctrl];
61+
5762 // プロファイル追加
5863 [self addProfile: [[DConnectAuthorizationProfile alloc ] initWithObject: self ]];
5964 [self addProfile: [[DConnectServiceDiscoveryProfile alloc ] initWithServiceProvider: self .serviceProvider]];
@@ -228,6 +233,11 @@ - (NSArray *) serviceProfilesWithServiceId: (NSString *) serviceId {
228233 return nil ;
229234}
230235
236+ - (id <DConnectEventCacheController>) eventCacheController
237+ {
238+ return [[DConnectMemoryCacheController alloc ] init ];
239+ }
240+
231241
232242- (NSString *)iconFilePath : (BOOL )isOnline
233243{
Original file line number Diff line number Diff line change 1616#import < DConnectSDK/DConnectRequestMessage.h>
1717#import < DConnectSDK/DConnectResponseMessage.h>
1818#import < DConnectSDK/DConnectServiceProvider.h>
19+ #import < DConnectSDK/DConnectEventCacheController.h>
1920
2021
2122/* !
115116 */
116117- (void )applicationWillEnterForeground ;
117118
119+ - (id <DConnectEventCacheController>) eventCacheController ;
120+
118121- (NSArray *) serviceProfilesWithServiceId : (NSString *) serviceId ;
119122
120123- (NSString *)iconFilePath : (BOOL )isOnline ;
You can’t perform that action at this time.
0 commit comments