- Add GeViScope Bridge (C# .NET 8.0) on port 7720 - Full SDK wrapper for camera control, PTZ, actions/events - 17 REST API endpoints for GeViScope server interaction - Support for MCS (Media Channel Simulator) with 16 test channels - Real-time action/event streaming via PLC callbacks - Add GeViServer Bridge (C# .NET 8.0) on port 7710 - Integration with GeViSoft orchestration layer - Input/output control and event management - Update Python API with new routers - /api/geviscope/* - Proxy to GeViScope Bridge - /api/geviserver/* - Proxy to GeViServer Bridge - /api/excel/* - Excel import functionality - Add Flutter app GeViScope integration - GeViScopeRemoteDataSource with 17 API methods - GeViScopeBloc for state management - GeViScopeScreen with PTZ controls - App drawer navigation to GeViScope - Add SDK documentation (extracted from PDFs) - GeViScope SDK docs (7 parts + action reference) - GeViSoft SDK docs (12 chunks) - Add .mcp.json for Claude Code MCP server config Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
156 lines
4.0 KiB
Dart
156 lines
4.0 KiB
Dart
import 'package:get_it/get_it.dart';
|
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|
|
|
// Core
|
|
import 'core/network/dio_client.dart';
|
|
|
|
// Data sources
|
|
import 'data/data_sources/remote/auth_remote_data_source.dart';
|
|
import 'data/data_sources/remote/server_remote_data_source.dart';
|
|
import 'data/data_sources/remote/action_mapping_remote_data_source.dart';
|
|
import 'data/data_sources/remote/geviserver_remote_data_source.dart';
|
|
import 'data/data_sources/remote/geviscope_remote_data_source.dart';
|
|
import 'data/data_sources/local/secure_storage_manager.dart';
|
|
import 'data/data_sources/local/server_local_data_source.dart';
|
|
import 'data/data_sources/local/action_mapping_local_data_source.dart';
|
|
|
|
// Services
|
|
import 'data/services/sync_service.dart';
|
|
import 'data/services/excel_import_service.dart';
|
|
|
|
// Repositories
|
|
import 'data/repositories/auth_repository_impl.dart';
|
|
import 'data/repositories/server_repository_impl.dart';
|
|
import 'data/repositories/action_mapping_repository_impl.dart';
|
|
import 'domain/repositories/auth_repository.dart';
|
|
import 'domain/repositories/server_repository.dart';
|
|
import 'domain/repositories/action_mapping_repository.dart';
|
|
|
|
// Use cases
|
|
import 'domain/use_cases/auth/login.dart';
|
|
import 'domain/use_cases/servers/get_servers.dart';
|
|
|
|
// BLoCs
|
|
import 'presentation/blocs/auth/auth_bloc.dart';
|
|
import 'presentation/blocs/server/server_bloc.dart';
|
|
import 'presentation/blocs/action_mapping/action_mapping_bloc.dart';
|
|
import 'presentation/blocs/geviserver/geviserver_bloc.dart';
|
|
import 'presentation/blocs/geviscope/geviscope_bloc.dart';
|
|
|
|
final sl = GetIt.instance;
|
|
|
|
Future<void> init() async {
|
|
// BLoCs
|
|
sl.registerFactory(
|
|
() => AuthBloc(
|
|
loginUseCase: sl(),
|
|
authRepository: sl(),
|
|
),
|
|
);
|
|
|
|
sl.registerFactory(
|
|
() => ServerBloc(
|
|
serverRepository: sl(),
|
|
),
|
|
);
|
|
|
|
sl.registerFactory(
|
|
() => ActionMappingBloc(
|
|
actionMappingRepository: sl(),
|
|
),
|
|
);
|
|
|
|
sl.registerFactory(
|
|
() => GeViServerBloc(
|
|
remoteDataSource: sl(),
|
|
),
|
|
);
|
|
|
|
sl.registerFactory(
|
|
() => GeViScopeBloc(
|
|
remoteDataSource: sl<GeViScopeRemoteDataSource>(),
|
|
),
|
|
);
|
|
|
|
// Use cases
|
|
sl.registerLazySingleton(() => Login(sl()));
|
|
sl.registerLazySingleton(() => GetServers(sl()));
|
|
|
|
// Repositories
|
|
sl.registerLazySingleton<AuthRepository>(
|
|
() => AuthRepositoryImpl(
|
|
remoteDataSource: sl(),
|
|
storageManager: sl(),
|
|
),
|
|
);
|
|
|
|
sl.registerLazySingleton<ServerRepository>(
|
|
() => ServerRepositoryImpl(
|
|
localDataSource: sl(),
|
|
remoteDataSource: sl(),
|
|
syncService: sl(),
|
|
),
|
|
);
|
|
|
|
sl.registerLazySingleton<ActionMappingRepository>(
|
|
() => ActionMappingRepositoryImpl(
|
|
localDataSource: sl(),
|
|
remoteDataSource: sl(),
|
|
syncService: sl(),
|
|
),
|
|
);
|
|
|
|
// Services
|
|
sl.registerLazySingleton<SyncService>(
|
|
() => SyncServiceImpl(
|
|
localDataSource: sl(),
|
|
remoteDataSource: sl(),
|
|
actionMappingLocalDataSource: sl(),
|
|
actionMappingRemoteDataSource: sl(),
|
|
),
|
|
);
|
|
|
|
sl.registerLazySingleton(
|
|
() => ExcelImportService(localDataSource: sl()),
|
|
);
|
|
|
|
// Data sources
|
|
sl.registerLazySingleton<AuthRemoteDataSource>(
|
|
() => AuthRemoteDataSourceImpl(dio: sl<DioClient>().dio),
|
|
);
|
|
|
|
sl.registerLazySingleton<ServerRemoteDataSource>(
|
|
() => ServerRemoteDataSourceImpl(dio: sl<DioClient>().dio),
|
|
);
|
|
|
|
sl.registerLazySingleton<ServerLocalDataSource>(
|
|
() => ServerLocalDataSourceImpl(),
|
|
);
|
|
|
|
sl.registerLazySingleton<ActionMappingRemoteDataSource>(
|
|
() => ActionMappingRemoteDataSourceImpl(dio: sl<DioClient>().dio),
|
|
);
|
|
|
|
sl.registerLazySingleton<ActionMappingLocalDataSource>(
|
|
() => ActionMappingLocalDataSourceImpl(),
|
|
);
|
|
|
|
sl.registerLazySingleton(
|
|
() => GeViServerRemoteDataSource(dio: sl<DioClient>().dio),
|
|
);
|
|
|
|
sl.registerLazySingleton(
|
|
() => GeViScopeRemoteDataSource(dio: sl<DioClient>().dio),
|
|
);
|
|
|
|
sl.registerLazySingleton(
|
|
() => SecureStorageManager(storage: sl()),
|
|
);
|
|
|
|
// Core
|
|
sl.registerLazySingleton(() => DioClient(sl()));
|
|
|
|
// External
|
|
sl.registerLazySingleton(() => const FlutterSecureStorage());
|
|
}
|