feat: GeViScope SDK integration with C# Bridge and Flutter app
- 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>
This commit is contained in:
@@ -33,4 +33,57 @@ class ApiConstants {
|
||||
|
||||
// Cross-switching endpoints
|
||||
static const String crossSwitchEndpoint = '/crossswitch';
|
||||
|
||||
// GeViServer endpoints
|
||||
static const String geviServerConnect = '/geviserver/connect';
|
||||
static const String geviServerDisconnect = '/geviserver/disconnect';
|
||||
static const String geviServerStatus = '/geviserver/status';
|
||||
static const String geviServerPing = '/geviserver/ping';
|
||||
static const String geviServerSendMessage = '/geviserver/send-message';
|
||||
|
||||
// GeViServer video control
|
||||
static const String geviServerVideoCrossSwitch = '/geviserver/video/crossswitch';
|
||||
static const String geviServerVideoClearOutput = '/geviserver/video/clear-output';
|
||||
|
||||
// GeViServer digital I/O
|
||||
static const String geviServerDigitalIoCloseContact = '/geviserver/digital-io/close-contact';
|
||||
static const String geviServerDigitalIoOpenContact = '/geviserver/digital-io/open-contact';
|
||||
|
||||
// GeViServer timer control
|
||||
static const String geviServerTimerStart = '/geviserver/timer/start';
|
||||
static const String geviServerTimerStop = '/geviserver/timer/stop';
|
||||
|
||||
// GeViServer custom actions
|
||||
static const String geviServerCustomAction = '/geviserver/custom-action';
|
||||
|
||||
// GeViScope endpoints (Camera Server SDK)
|
||||
static const String geviScopeConnect = '/geviscope/connect';
|
||||
static const String geviScopeDisconnect = '/geviscope/disconnect';
|
||||
static const String geviScopeStatus = '/geviscope/status';
|
||||
|
||||
// GeViScope media channels
|
||||
static const String geviScopeChannels = '/geviscope/channels';
|
||||
static const String geviScopeChannelsRefresh = '/geviscope/channels/refresh';
|
||||
|
||||
// GeViScope actions
|
||||
static const String geviScopeAction = '/geviscope/action';
|
||||
static const String geviScopeCustomAction = '/geviscope/custom-action';
|
||||
|
||||
// GeViScope video control
|
||||
static const String geviScopeCrossSwitch = '/geviscope/video/crossswitch';
|
||||
|
||||
// GeViScope PTZ camera control
|
||||
static const String geviScopeCameraPan = '/geviscope/camera/pan';
|
||||
static const String geviScopeCameraTilt = '/geviscope/camera/tilt';
|
||||
static const String geviScopeCameraZoom = '/geviscope/camera/zoom';
|
||||
static const String geviScopeCameraStop = '/geviscope/camera/stop';
|
||||
static const String geviScopeCameraPreset = '/geviscope/camera/preset';
|
||||
|
||||
// GeViScope digital I/O
|
||||
static const String geviScopeDigitalIoClose = '/geviscope/digital-io/close';
|
||||
static const String geviScopeDigitalIoOpen = '/geviscope/digital-io/open';
|
||||
|
||||
// GeViScope messages
|
||||
static const String geviScopeMessages = '/geviscope/messages';
|
||||
static const String geviScopeMessagesClear = '/geviscope/messages/clear';
|
||||
}
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
/// Simple in-memory token storage for web (when secure storage fails)
|
||||
import 'dart:html' as html;
|
||||
|
||||
/// Token storage for web using localStorage to persist across page reloads
|
||||
class TokenManager {
|
||||
static final TokenManager _instance = TokenManager._internal();
|
||||
factory TokenManager() => _instance;
|
||||
TokenManager._internal();
|
||||
|
||||
String? _accessToken;
|
||||
String? _refreshToken;
|
||||
String? _username;
|
||||
String? _userRole;
|
||||
static const String _accessTokenKey = 'auth_access_token';
|
||||
static const String _refreshTokenKey = 'auth_refresh_token';
|
||||
static const String _usernameKey = 'auth_username';
|
||||
static const String _userRoleKey = 'auth_user_role';
|
||||
|
||||
void saveTokens({
|
||||
String? accessToken,
|
||||
@@ -15,21 +17,29 @@ class TokenManager {
|
||||
String? username,
|
||||
String? userRole,
|
||||
}) {
|
||||
if (accessToken != null) _accessToken = accessToken;
|
||||
if (refreshToken != null) _refreshToken = refreshToken;
|
||||
if (username != null) _username = username;
|
||||
if (userRole != null) _userRole = userRole;
|
||||
if (accessToken != null) {
|
||||
html.window.localStorage[_accessTokenKey] = accessToken;
|
||||
}
|
||||
if (refreshToken != null) {
|
||||
html.window.localStorage[_refreshTokenKey] = refreshToken;
|
||||
}
|
||||
if (username != null) {
|
||||
html.window.localStorage[_usernameKey] = username;
|
||||
}
|
||||
if (userRole != null) {
|
||||
html.window.localStorage[_userRoleKey] = userRole;
|
||||
}
|
||||
}
|
||||
|
||||
String? get accessToken => _accessToken;
|
||||
String? get refreshToken => _refreshToken;
|
||||
String? get username => _username;
|
||||
String? get userRole => _userRole;
|
||||
String? get accessToken => html.window.localStorage[_accessTokenKey];
|
||||
String? get refreshToken => html.window.localStorage[_refreshTokenKey];
|
||||
String? get username => html.window.localStorage[_usernameKey];
|
||||
String? get userRole => html.window.localStorage[_userRoleKey];
|
||||
|
||||
void clear() {
|
||||
_accessToken = null;
|
||||
_refreshToken = null;
|
||||
_username = null;
|
||||
_userRole = null;
|
||||
html.window.localStorage.remove(_accessTokenKey);
|
||||
html.window.localStorage.remove(_refreshTokenKey);
|
||||
html.window.localStorage.remove(_usernameKey);
|
||||
html.window.localStorage.remove(_userRoleKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user