Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sailassist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CpjJwWHV
Sailassist
Commits
a1620e01
Commit
a1620e01
authored
Nov 16, 2023
by
sugita mamoru
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
4bc8200f
' into develop
parents
f1b96f97
4bc8200f
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
766 additions
and
23 deletions
+766
-23
project.pbxproj
Seilassist/Sailassist.xcodeproj/project.pbxproj
+62
-0
GetMessage.swift
Seilassist/Sailassist/Chat/GetMessage.swift
+37
-0
ContentView.swift
Seilassist/Sailassist/ContentView.swift
+14
-2
EcaTask.swift
Seilassist/Sailassist/ECA/EcaTask.swift
+58
-0
ErrorView.swift
Seilassist/Sailassist/ErrorView.swift
+22
-0
HttpRequestType.swift
Seilassist/Sailassist/Http/HttpRequestType.swift
+8
-1
Info.plist
Seilassist/Sailassist/Info.plist
+3
-1
ReqLogin.swift
Seilassist/Sailassist/Json/ReqLogin.swift
+10
-4
ReqTaskList.swift
Seilassist/Sailassist/Json/ReqTaskList.swift
+14
-0
ResGetMessages.swift
Seilassist/Sailassist/Json/ResGetMessages.swift
+32
-0
ResLogin.swift
Seilassist/Sailassist/Json/ResLogin.swift
+5
-5
ResMonitoringRoute.swift
Seilassist/Sailassist/Json/ResMonitoringRoute.swift
+20
-0
ResShipStatus.swift
Seilassist/Sailassist/Json/ResShipStatus.swift
+17
-0
LocationViewModel.swift
Seilassist/Sailassist/LocationViewModel.swift
+67
-0
LoginView.swift
Seilassist/Sailassist/Login/LoginView.swift
+25
-1
InputUserNameView.swift
Seilassist/Sailassist/Login/View/InputUserNameView.swift
+24
-0
ScannerViewModel.swift
Seilassist/Sailassist/Login/ViewModel/ScannerViewModel.swift
+4
-3
MonitoringRoute.swift
Seilassist/Sailassist/Map/MonitoringRoute.swift
+71
-0
Preferences.swift
Seilassist/Sailassist/Preferences/Preferences.swift
+0
-3
PreferencesKey.swift
Seilassist/Sailassist/Preferences/PreferencesKey.swift
+0
-3
RequestLocationView.swift
Seilassist/Sailassist/RequestLocationView.swift
+26
-0
ServerSession.swift
Seilassist/Sailassist/ServerSession/ServerSession.swift
+43
-0
SessionGetMessage.swift
Seilassist/Sailassist/ServerSession/SessionGetMessage.swift
+42
-0
SessionMonitoringRoute.swift
...ist/Sailassist/ServerSession/SessionMonitoringRoute.swift
+43
-0
SessionShipStatus.swift
Seilassist/Sailassist/ServerSession/SessionShipStatus.swift
+42
-0
SessionTaskList.swift
Seilassist/Sailassist/ServerSession/SessionTaskList.swift
+42
-0
SharingData.swift
Seilassist/Sailassist/SharingData/SharingData.swift
+35
-0
No files found.
Seilassist/Sailassist.xcodeproj/project.pbxproj
View file @
a1620e01
...
@@ -66,12 +66,26 @@
...
@@ -66,12 +66,26 @@
02CE4DC82ADF97E8002E79BC
/* View+Extensions.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02CE4DC72ADF97E8002E79BC
/* View+Extensions.swift */
;
};
02CE4DC82ADF97E8002E79BC
/* View+Extensions.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02CE4DC72ADF97E8002E79BC
/* View+Extensions.swift */
;
};
02CE4DCC2ADFA03F002E79BC
/* SelectedTabModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02CE4DCB2ADFA03F002E79BC
/* SelectedTabModel.swift */
;
};
02CE4DCC2ADFA03F002E79BC
/* SelectedTabModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02CE4DCB2ADFA03F002E79BC
/* SelectedTabModel.swift */
;
};
02CE4DDA2ADFBA72002E79BC
/* MapRepresentable.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02CE4DD92ADFBA72002E79BC
/* MapRepresentable.swift */
;
};
02CE4DDA2ADFBA72002E79BC
/* MapRepresentable.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02CE4DD92ADFBA72002E79BC
/* MapRepresentable.swift */
;
};
D5258C992B0334BF00365276
/* SessionShipStatus.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258C982B0334BF00365276
/* SessionShipStatus.swift */
;
};
D5258C9B2B03401E00365276
/* MonitoringRoute.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258C9A2B03401E00365276
/* MonitoringRoute.swift */
;
};
D5258C9D2B03507A00365276
/* ResMonitoringRoute.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258C9C2B03507A00365276
/* ResMonitoringRoute.swift */
;
};
D5258C9F2B03527400365276
/* ResGetMessages.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258C9E2B03527400365276
/* ResGetMessages.swift */
;
};
D5258CA12B03593500365276
/* SessionMonitoringRoute.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258CA02B03593500365276
/* SessionMonitoringRoute.swift */
;
};
D5258CA32B036CC500365276
/* SessionGetMessage.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258CA22B036CC500365276
/* SessionGetMessage.swift */
;
};
D5258CA52B036F0700365276
/* GetMessage.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258CA42B036F0700365276
/* GetMessage.swift */
;
};
D5258CA72B03988600365276
/* ReqTaskList.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5258CA62B03988500365276
/* ReqTaskList.swift */
;
};
D52D213A2AEBAC0500324D58
/* HttpRequestType.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D52D21392AEBAC0500324D58
/* HttpRequestType.swift */
;
};
D52D213A2AEBAC0500324D58
/* HttpRequestType.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D52D21392AEBAC0500324D58
/* HttpRequestType.swift */
;
};
D52D213F2AEBB7D700324D58
/* RegisteredEca.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D52D213E2AEBB7D700324D58
/* RegisteredEca.swift */
;
};
D52D213F2AEBB7D700324D58
/* RegisteredEca.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D52D213E2AEBB7D700324D58
/* RegisteredEca.swift */
;
};
D52D21412AEDE18F00324D58
/* EcaCoordinatesTable.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D52D21402AEDE18F00324D58
/* EcaCoordinatesTable.swift */
;
};
D52D21412AEDE18F00324D58
/* EcaCoordinatesTable.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D52D21402AEDE18F00324D58
/* EcaCoordinatesTable.swift */
;
};
D5AE351A2AEBA66A00059889
/* ReqLogin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5AE35182AEBA66A00059889
/* ReqLogin.swift */
;
};
D5AE351A2AEBA66A00059889
/* ReqLogin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5AE35182AEBA66A00059889
/* ReqLogin.swift */
;
};
D5AE351B2AEBA66A00059889
/* ResLogin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5AE35192AEBA66A00059889
/* ResLogin.swift */
;
};
D5AE351B2AEBA66A00059889
/* ResLogin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5AE35192AEBA66A00059889
/* ResLogin.swift */
;
};
D5AE351D2AEBA6FC00059889
/* SessionLogin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5AE351C2AEBA6FC00059889
/* SessionLogin.swift */
;
};
D5AE351D2AEBA6FC00059889
/* SessionLogin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5AE351C2AEBA6FC00059889
/* SessionLogin.swift */
;
};
D5CB6F992B02088C00EC2010
/* ResShipStatus.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5CB6F982B02088C00EC2010
/* ResShipStatus.swift */
;
};
D5CB6F9B2B021C4F00EC2010
/* LocationViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5CB6F9A2B021C4F00EC2010
/* LocationViewModel.swift */
;
};
D5CB6F9D2B02203500EC2010
/* RequestLocationView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5CB6F9C2B02203500EC2010
/* RequestLocationView.swift */
;
};
D5CB6F9F2B0220A700EC2010
/* ErrorView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5CB6F9E2B0220A700EC2010
/* ErrorView.swift */
;
};
D5CB6FA12B023F7F00EC2010
/* EcaTask.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5CB6FA02B023F7F00EC2010
/* EcaTask.swift */
;
};
D5E03A672B04484D00D65FCE
/* SessionTaskList.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5E03A662B04484D00D65FCE
/* SessionTaskList.swift */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
/* Begin PBXContainerItemProxy section */
...
@@ -168,12 +182,26 @@
...
@@ -168,12 +182,26 @@
02CE4DCB2ADFA03F002E79BC
/* SelectedTabModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SelectedTabModel.swift
;
sourceTree
=
"<group>"
;
};
02CE4DCB2ADFA03F002E79BC
/* SelectedTabModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SelectedTabModel.swift
;
sourceTree
=
"<group>"
;
};
02CE4DCD2ADFB9FF002E79BC
/* Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
02CE4DCD2ADFB9FF002E79BC
/* Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
02CE4DD92ADFBA72002E79BC
/* MapRepresentable.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapRepresentable.swift
;
sourceTree
=
"<group>"
;
};
02CE4DD92ADFBA72002E79BC
/* MapRepresentable.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapRepresentable.swift
;
sourceTree
=
"<group>"
;
};
D5258C982B0334BF00365276
/* SessionShipStatus.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
SessionShipStatus.swift
;
path
=
Sailassist/ServerSession/SessionShipStatus.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5258C9A2B03401E00365276
/* MonitoringRoute.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
MonitoringRoute.swift
;
path
=
Sailassist/Map/MonitoringRoute.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5258C9C2B03507A00365276
/* ResMonitoringRoute.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ResMonitoringRoute.swift
;
path
=
Sailassist/Json/ResMonitoringRoute.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5258C9E2B03527400365276
/* ResGetMessages.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ResGetMessages.swift
;
path
=
Sailassist/Json/ResGetMessages.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5258CA02B03593500365276
/* SessionMonitoringRoute.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
SessionMonitoringRoute.swift
;
path
=
Sailassist/ServerSession/SessionMonitoringRoute.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5258CA22B036CC500365276
/* SessionGetMessage.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
SessionGetMessage.swift
;
path
=
Sailassist/ServerSession/SessionGetMessage.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5258CA42B036F0700365276
/* GetMessage.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
GetMessage.swift
;
path
=
Sailassist/Chat/GetMessage.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5258CA62B03988500365276
/* ReqTaskList.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ReqTaskList.swift
;
path
=
Sailassist/Json/ReqTaskList.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D52D21392AEBAC0500324D58
/* HttpRequestType.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
HttpRequestType.swift
;
path
=
Sailassist/Http/HttpRequestType.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D52D21392AEBAC0500324D58
/* HttpRequestType.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
HttpRequestType.swift
;
path
=
Sailassist/Http/HttpRequestType.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D52D213E2AEBB7D700324D58
/* RegisteredEca.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
RegisteredEca.swift
;
path
=
Sailassist/ECA/RegisteredEca.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D52D213E2AEBB7D700324D58
/* RegisteredEca.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
RegisteredEca.swift
;
path
=
Sailassist/ECA/RegisteredEca.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D52D21402AEDE18F00324D58
/* EcaCoordinatesTable.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
EcaCoordinatesTable.swift
;
path
=
Sailassist/ECA/EcaCoordinatesTable.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D52D21402AEDE18F00324D58
/* EcaCoordinatesTable.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
EcaCoordinatesTable.swift
;
path
=
Sailassist/ECA/EcaCoordinatesTable.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5AE35182AEBA66A00059889
/* ReqLogin.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ReqLogin.swift
;
path
=
Sailassist/Json/ReqLogin.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5AE35182AEBA66A00059889
/* ReqLogin.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ReqLogin.swift
;
path
=
Sailassist/Json/ReqLogin.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5AE35192AEBA66A00059889
/* ResLogin.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ResLogin.swift
;
path
=
Sailassist/Json/ResLogin.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5AE35192AEBA66A00059889
/* ResLogin.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ResLogin.swift
;
path
=
Sailassist/Json/ResLogin.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5AE351C2AEBA6FC00059889
/* SessionLogin.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
SessionLogin.swift
;
path
=
Sailassist/ServerSession/SessionLogin.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5AE351C2AEBA6FC00059889
/* SessionLogin.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
SessionLogin.swift
;
path
=
Sailassist/ServerSession/SessionLogin.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5CB6F982B02088C00EC2010
/* ResShipStatus.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ResShipStatus.swift
;
path
=
Sailassist/Json/ResShipStatus.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5CB6F9A2B021C4F00EC2010
/* LocationViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
LocationViewModel.swift
;
path
=
Sailassist/LocationViewModel.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5CB6F9C2B02203500EC2010
/* RequestLocationView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
RequestLocationView.swift
;
path
=
Sailassist/RequestLocationView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5CB6F9E2B0220A700EC2010
/* ErrorView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ErrorView.swift
;
path
=
Sailassist/ErrorView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5CB6FA02B023F7F00EC2010
/* EcaTask.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
EcaTask.swift
;
path
=
Sailassist/ECA/EcaTask.swift
;
sourceTree
=
SOURCE_ROOT
;
};
D5E03A662B04484D00D65FCE
/* SessionTaskList.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
SessionTaskList.swift
;
path
=
Sailassist/ServerSession/SessionTaskList.swift
;
sourceTree
=
SOURCE_ROOT
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -251,6 +279,9 @@
...
@@ -251,6 +279,9 @@
020B983D2AD8C34A0029DE4C
/* Login */
,
020B983D2AD8C34A0029DE4C
/* Login */
,
020B98172AD8C3190029DE4C
/* Assets.xcassets */
,
020B98172AD8C3190029DE4C
/* Assets.xcassets */
,
020B98192AD8C3190029DE4C
/* Preview Content */
,
020B98192AD8C3190029DE4C
/* Preview Content */
,
D5CB6F9A2B021C4F00EC2010
/* LocationViewModel.swift */
,
D5CB6F9C2B02203500EC2010
/* RequestLocationView.swift */
,
D5CB6F9E2B0220A700EC2010
/* ErrorView.swift */
,
);
);
path
=
SailAssist
;
path
=
SailAssist
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -307,6 +338,7 @@
...
@@ -307,6 +338,7 @@
02CE4DD92ADFBA72002E79BC
/* MapRepresentable.swift */
,
02CE4DD92ADFBA72002E79BC
/* MapRepresentable.swift */
,
02CD068E2AE6535F005F8D8F
/* MapSource.swift */
,
02CD068E2AE6535F005F8D8F
/* MapSource.swift */
,
02CD06902AE6536B005F8D8F
/* LayerEnum.swift */
,
02CD06902AE6536B005F8D8F
/* LayerEnum.swift */
,
D5258C9A2B03401E00365276
/* MonitoringRoute.swift */
,
);
);
path
=
Map
;
path
=
Map
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -355,6 +387,7 @@
...
@@ -355,6 +387,7 @@
children
=
(
children
=
(
020B98622ADD14E40029DE4C
/* ChatView.swift */
,
020B98622ADD14E40029DE4C
/* ChatView.swift */
,
02A1DE2D2AFB497B005BCF55
/* View */
,
02A1DE2D2AFB497B005BCF55
/* View */
,
D5258CA42B036F0700365276
/* GetMessage.swift */
,
);
);
path
=
Chat
;
path
=
Chat
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -427,6 +460,10 @@
...
@@ -427,6 +460,10 @@
02CD06922AE88970005F8D8F
/* ServerSession.swift */
,
02CD06922AE88970005F8D8F
/* ServerSession.swift */
,
02CD06942AE895F5005F8D8F
/* APIError.swift */
,
02CD06942AE895F5005F8D8F
/* APIError.swift */
,
025C27FD2B0206D700BADC49
/* PDFDownloadManager.swift */
,
025C27FD2B0206D700BADC49
/* PDFDownloadManager.swift */
,
D5258C982B0334BF00365276
/* SessionShipStatus.swift */
,
D5258CA02B03593500365276
/* SessionMonitoringRoute.swift */
,
D5258CA22B036CC500365276
/* SessionGetMessage.swift */
,
D5E03A662B04484D00D65FCE
/* SessionTaskList.swift */
,
);
);
path
=
ServerSession
;
path
=
ServerSession
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -503,6 +540,7 @@
...
@@ -503,6 +540,7 @@
children
=
(
children
=
(
D52D213E2AEBB7D700324D58
/* RegisteredEca.swift */
,
D52D213E2AEBB7D700324D58
/* RegisteredEca.swift */
,
D52D21402AEDE18F00324D58
/* EcaCoordinatesTable.swift */
,
D52D21402AEDE18F00324D58
/* EcaCoordinatesTable.swift */
,
D5CB6FA02B023F7F00EC2010
/* EcaTask.swift */
,
);
);
path
=
ECA
;
path
=
ECA
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -512,6 +550,10 @@
...
@@ -512,6 +550,10 @@
children
=
(
children
=
(
D5AE35182AEBA66A00059889
/* ReqLogin.swift */
,
D5AE35182AEBA66A00059889
/* ReqLogin.swift */
,
D5AE35192AEBA66A00059889
/* ResLogin.swift */
,
D5AE35192AEBA66A00059889
/* ResLogin.swift */
,
D5CB6F982B02088C00EC2010
/* ResShipStatus.swift */
,
D5258C9C2B03507A00365276
/* ResMonitoringRoute.swift */
,
D5258C9E2B03527400365276
/* ResGetMessages.swift */
,
D5258CA62B03988500365276
/* ReqTaskList.swift */
,
);
);
path
=
Json
;
path
=
Json
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -655,6 +697,7 @@
...
@@ -655,6 +697,7 @@
isa
=
PBXSourcesBuildPhase
;
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
D5258CA52B036F0700365276
/* GetMessage.swift in Sources */
,
D52D21412AEDE18F00324D58
/* EcaCoordinatesTable.swift in Sources */
,
D52D21412AEDE18F00324D58
/* EcaCoordinatesTable.swift in Sources */
,
02A1DE2F2AFB4AA0005BCF55
/* ChatInputView.swift in Sources */
,
02A1DE2F2AFB4AA0005BCF55
/* ChatInputView.swift in Sources */
,
02CD06912AE6536B005F8D8F
/* LayerEnum.swift in Sources */
,
02CD06912AE6536B005F8D8F
/* LayerEnum.swift in Sources */
,
...
@@ -662,16 +705,20 @@
...
@@ -662,16 +705,20 @@
D52D213F2AEBB7D700324D58
/* RegisteredEca.swift in Sources */
,
D52D213F2AEBB7D700324D58
/* RegisteredEca.swift in Sources */
,
02CD06952AE895F5005F8D8F
/* APIError.swift in Sources */
,
02CD06952AE895F5005F8D8F
/* APIError.swift in Sources */
,
022A98202AF8B8960079C55A
/* LocationCalculation.swift in Sources */
,
022A98202AF8B8960079C55A
/* LocationCalculation.swift in Sources */
,
D5258CA72B03988600365276
/* ReqTaskList.swift in Sources */
,
D5CB6F9B2B021C4F00EC2010
/* LocationViewModel.swift in Sources */
,
02CE4DC82ADF97E8002E79BC
/* View+Extensions.swift in Sources */
,
02CE4DC82ADF97E8002E79BC
/* View+Extensions.swift in Sources */
,
025C28002B034A1900BADC49
/* PDFViewer.swift in Sources */
,
025C28002B034A1900BADC49
/* PDFViewer.swift in Sources */
,
02C3E6092AFDF30000AF7837
/* ChatMemberView.swift in Sources */
,
02C3E6092AFDF30000AF7837
/* ChatMemberView.swift in Sources */
,
020B98412AD8C3810029DE4C
/* LoginView.swift in Sources */
,
020B98412AD8C3810029DE4C
/* LoginView.swift in Sources */
,
D5AE351D2AEBA6FC00059889
/* SessionLogin.swift in Sources */
,
D5AE351D2AEBA6FC00059889
/* SessionLogin.swift in Sources */
,
D5258C9F2B03527400365276
/* ResGetMessages.swift in Sources */
,
020B98552AD924930029DE4C
/* QrCodeScannerView.swift in Sources */
,
020B98552AD924930029DE4C
/* QrCodeScannerView.swift in Sources */
,
02CE4D7F2ADE42A9002E79BC
/* MenuContentView.swift in Sources */
,
02CE4D7F2ADE42A9002E79BC
/* MenuContentView.swift in Sources */
,
D5AE351B2AEBA66A00059889
/* ResLogin.swift in Sources */
,
D5AE351B2AEBA66A00059889
/* ResLogin.swift in Sources */
,
02CE4D832ADE672B002E79BC
/* MapTaskView.swift in Sources */
,
02CE4D832ADE672B002E79BC
/* MapTaskView.swift in Sources */
,
02CE4DCC2ADFA03F002E79BC
/* SelectedTabModel.swift in Sources */
,
02CE4DCC2ADFA03F002E79BC
/* SelectedTabModel.swift in Sources */
,
D5258C9B2B03401E00365276
/* MonitoringRoute.swift in Sources */
,
020B98162AD8C3150029DE4C
/* ContentView.swift in Sources */
,
020B98162AD8C3150029DE4C
/* ContentView.swift in Sources */
,
020B98632ADD14E50029DE4C
/* ChatView.swift in Sources */
,
020B98632ADD14E50029DE4C
/* ChatView.swift in Sources */
,
02CE4DDA2ADFBA72002E79BC
/* MapRepresentable.swift in Sources */
,
02CE4DDA2ADFBA72002E79BC
/* MapRepresentable.swift in Sources */
,
...
@@ -680,6 +727,8 @@
...
@@ -680,6 +727,8 @@
020B984D2AD9178F0029DE4C
/* ScannerViewModel.swift in Sources */
,
020B984D2AD9178F0029DE4C
/* ScannerViewModel.swift in Sources */
,
020B98142AD8C3140029DE4C
/* SailassistApp.swift in Sources */
,
020B98142AD8C3140029DE4C
/* SailassistApp.swift in Sources */
,
02CE4D852ADF6295002E79BC
/* TaskSwitchingMenuView.swift in Sources */
,
02CE4D852ADF6295002E79BC
/* TaskSwitchingMenuView.swift in Sources */
,
D5CB6F9F2B0220A700EC2010
/* ErrorView.swift in Sources */
,
D5CB6F992B02088C00EC2010
/* ResShipStatus.swift in Sources */
,
020B984B2AD915810029DE4C
/* QRReadView.swift in Sources */
,
020B984B2AD915810029DE4C
/* QRReadView.swift in Sources */
,
02A1DE332AFB654A005BCF55
/* CustomCornerRadius.swift in Sources */
,
02A1DE332AFB654A005BCF55
/* CustomCornerRadius.swift in Sources */
,
020B98692ADD221E0029DE4C
/* Preferences.swift in Sources */
,
020B98692ADD221E0029DE4C
/* Preferences.swift in Sources */
,
...
@@ -687,19 +736,26 @@
...
@@ -687,19 +736,26 @@
02A1DE312AFB61D8005BCF55
/* MyChatContentView.swift in Sources */
,
02A1DE312AFB61D8005BCF55
/* MyChatContentView.swift in Sources */
,
025C27FE2B0206D700BADC49
/* PDFDownloadManager.swift in Sources */
,
025C27FE2B0206D700BADC49
/* PDFDownloadManager.swift in Sources */
,
025C27FC2AFE191A00BADC49
/* MenuManualView.swift in Sources */
,
025C27FC2AFE191A00BADC49
/* MenuManualView.swift in Sources */
,
D5CB6F9D2B02203500EC2010
/* RequestLocationView.swift in Sources */
,
020B98592AD92A4C0029DE4C
/* MainTabView.swift in Sources */
,
020B98592AD92A4C0029DE4C
/* MainTabView.swift in Sources */
,
020B984F2AD9182D0029DE4C
/* InputUserNameView.swift in Sources */
,
020B984F2AD9182D0029DE4C
/* InputUserNameView.swift in Sources */
,
D5AE351A2AEBA66A00059889
/* ReqLogin.swift in Sources */
,
D5AE351A2AEBA66A00059889
/* ReqLogin.swift in Sources */
,
020B98512AD9189A0029DE4C
/* InputIdPassWordView.swift in Sources */
,
020B98512AD9189A0029DE4C
/* InputIdPassWordView.swift in Sources */
,
D52D213A2AEBAC0500324D58
/* HttpRequestType.swift in Sources */
,
D52D213A2AEBAC0500324D58
/* HttpRequestType.swift in Sources */
,
D5258CA12B03593500365276
/* SessionMonitoringRoute.swift in Sources */
,
D5E03A672B04484D00D65FCE
/* SessionTaskList.swift in Sources */
,
020B986E2ADD3E8D0029DE4C
/* DateTextLib.swift in Sources */
,
020B986E2ADD3E8D0029DE4C
/* DateTextLib.swift in Sources */
,
D5258C9D2B03507A00365276
/* ResMonitoringRoute.swift in Sources */
,
020B98672ADD15050029DE4C
/* MenuView.swift in Sources */
,
020B98672ADD15050029DE4C
/* MenuView.swift in Sources */
,
020B98572AD924F50029DE4C
/* CameraPreview.swift in Sources */
,
020B98572AD924F50029DE4C
/* CameraPreview.swift in Sources */
,
D5CB6FA12B023F7F00EC2010
/* EcaTask.swift in Sources */
,
02CD068F2AE6535F005F8D8F
/* MapSource.swift in Sources */
,
02CD068F2AE6535F005F8D8F
/* MapSource.swift in Sources */
,
02C3E5CE2AFCA04700AF7837
/* OtherChatContentView.swift in Sources */
,
02C3E5CE2AFCA04700AF7837
/* OtherChatContentView.swift in Sources */
,
020B98442AD8E4910029DE4C
/* FontStyle.swift in Sources */
,
020B98442AD8E4910029DE4C
/* FontStyle.swift in Sources */
,
025C27FA2AFE119D00BADC49
/* MenuTitleView.swift in Sources */
,
025C27FA2AFE119D00BADC49
/* MenuTitleView.swift in Sources */
,
02CE4D892ADF62E1002E79BC
/* EcaSettingView.swift in Sources */
,
02CE4D892ADF62E1002E79BC
/* EcaSettingView.swift in Sources */
,
D5258CA32B036CC500365276
/* SessionGetMessage.swift in Sources */
,
D5258C992B0334BF00365276
/* SessionShipStatus.swift in Sources */
,
02CE4D872ADF62A7002E79BC
/* EcaListView.swift in Sources */
,
02CE4D872ADF62A7002E79BC
/* EcaListView.swift in Sources */
,
020B986C2ADD3E810029DE4C
/* InTextLib.swift in Sources */
,
020B986C2ADD3E810029DE4C
/* InTextLib.swift in Sources */
,
02C3E5D12AFCC16800AF7837
/* ChatTitleView.swift in Sources */
,
02C3E5D12AFCC16800AF7837
/* ChatTitleView.swift in Sources */
,
...
@@ -872,7 +928,10 @@
...
@@ -872,7 +928,10 @@
ENABLE_PREVIEWS
=
YES
;
ENABLE_PREVIEWS
=
YES
;
GENERATE_INFOPLIST_FILE
=
YES
;
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
Sailassist/Info.plist
;
INFOPLIST_FILE
=
Sailassist/Info.plist
;
INFOPLIST_KEY_LSApplicationCategoryType
=
""
;
INFOPLIST_KEY_NSCameraUsageDescription
=
"QRコードの読み取りにカメラを使用します。"
;
INFOPLIST_KEY_NSCameraUsageDescription
=
"QRコードの読み取りにカメラを使用します。"
;
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription
=
"It records your location even when running in the background to determine your location."
;
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription
=
"Record location information to identify your location."
;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation
=
YES
;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation
=
YES
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UILaunchScreen_Generation
=
YES
;
INFOPLIST_KEY_UILaunchScreen_Generation
=
YES
;
...
@@ -904,7 +963,10 @@
...
@@ -904,7 +963,10 @@
ENABLE_PREVIEWS
=
YES
;
ENABLE_PREVIEWS
=
YES
;
GENERATE_INFOPLIST_FILE
=
YES
;
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
Sailassist/Info.plist
;
INFOPLIST_FILE
=
Sailassist/Info.plist
;
INFOPLIST_KEY_LSApplicationCategoryType
=
""
;
INFOPLIST_KEY_NSCameraUsageDescription
=
"QRコードの読み取りにカメラを使用します。"
;
INFOPLIST_KEY_NSCameraUsageDescription
=
"QRコードの読み取りにカメラを使用します。"
;
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription
=
"It records your location even when running in the background to determine your location."
;
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription
=
"Record location information to identify your location."
;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation
=
YES
;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation
=
YES
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UILaunchScreen_Generation
=
YES
;
INFOPLIST_KEY_UILaunchScreen_Generation
=
YES
;
...
...
Seilassist/Sailassist/Chat/GetMessage.swift
0 → 100644
View file @
a1620e01
//
// GetMessage.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
class
GetMessage
{
var
sessionGetMessage
=
SessionGetMessage
()
func
start
()
{
print
(
debug
:
"called"
)
sessionGetMessage
.
RequestGetMessage
(
responseGetMessage
)
}
private
func
responseGetMessage
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResGetMessages
.
self
)
if
let
res
=
resjson
{
SharingData
.
Message
.
mode
=
res
.
mode
SharingData
.
Message
.
messages
=
[]
if
let
msg
=
res
.
messages
{
SharingData
.
Message
.
messages
=
msg
}
}
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
break
}
}
}
Seilassist/Sailassist/ContentView.swift
View file @
a1620e01
...
@@ -8,12 +8,21 @@
...
@@ -8,12 +8,21 @@
import
SwiftUI
import
SwiftUI
struct
ContentView
:
View
{
struct
ContentView
:
View
{
@State
var
isLogin
=
tru
e
//ContentView.LoginCheck()
@State
var
isLogin
=
fals
e
//ContentView.LoginCheck()
@EnvironmentObject
private
var
sceneDelegate
:
SceneDelegate
@EnvironmentObject
private
var
sceneDelegate
:
SceneDelegate
@StateObject
var
locationViewModel
=
LocationViewModel
()
var
selectedTabModel
=
SelectedTabModel
()
var
selectedTabModel
=
SelectedTabModel
()
var
body
:
some
View
{
var
body
:
some
View
{
switch
locationViewModel
.
authorizationStatus
{
case
.
notDetermined
:
RequestLocationView
()
.
environmentObject
(
locationViewModel
)
case
.
restricted
:
ErrorView
(
errorText
:
"位置情報の使用が制限されています。"
)
case
.
denied
:
ErrorView
(
errorText
:
"位置情報を使用できません。"
)
case
.
authorizedAlways
,
.
authorizedWhenInUse
:
MainTabView
()
MainTabView
()
.
environmentObject
(
selectedTabModel
)
.
environmentObject
(
selectedTabModel
)
.
onAppear
(){
.
onAppear
(){
...
@@ -30,6 +39,9 @@ struct ContentView: View {
...
@@ -30,6 +39,9 @@ struct ContentView: View {
},
content
:
{
},
content
:
{
LoginView
(
isLogin
:
$
isLogin
)
LoginView
(
isLogin
:
$
isLogin
)
})
})
default
:
Text
(
"Unexpected status"
)
}
}
}
}
}
...
...
Seilassist/Sailassist/ECA/EcaTask.swift
0 → 100644
View file @
a1620e01
//
// EcaTask.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/13.
//
import
Foundation
class
EcaTask
{
var
sessionShipStatus
=
SessionShipStatus
()
var
sharingData
=
SharingData
.
shared
func
start
()
{
print
(
debug
:
"called"
)
sessionShipStatus
.
RequestShipStatus
(
responseShipStatus
)
}
func
responseShipStatus
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResShipStatus
.
self
)
if
let
res
=
resjson
{
SharingData
.
My
.
speed
=
res
.
speed
SharingData
.
My
.
course
=
res
.
course
SharingData
.
My
.
heading
=
res
.
heading
SharingData
.
My
.
server
?
.
latitude
=
res
.
lat
SharingData
.
My
.
server
?
.
longitude
=
res
.
lon
SharingData
.
My
.
dataTime
=
res
.
dataTime
//2023-11-02T05:25:49.4362123Z
}
checkEca
()
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
break
}
}
private
func
checkEca
()
{
let
runningEca
=
sharingData
.
ecaArea
.
first
(
where
:
{(
key
,
value
)
in
value
.
isRunning
==
true
})
if
let
eca
=
runningEca
?
.
value
{
if
let
location
=
SharingData
.
My
.
location
{
let
distance
=
LocationCalculation
.
checkPolyLine
(
objPos
:
eca
.
points
,
shipPos
:
location
)
if
eca
.
swStart
>=
Float
(
distance
)
{
}
if
eca
.
swNotice
>=
Float
(
distance
)
{
}
if
eca
.
swFinish
>=
Float
(
distance
)
{
}
}
}
}
}
Seilassist/Sailassist/ErrorView.swift
0 → 100644
View file @
a1620e01
//
// ErrorView.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/13.
//
import
SwiftUI
struct
ErrorView
:
View
{
var
errorText
:
String
var
body
:
some
View
{
Text
(
errorText
)
}
}
struct
ErrorView_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
ErrorView
(
errorText
:
"Error message"
)
}
}
Seilassist/Sailassist/Http/HttpRequestType.swift
View file @
a1620e01
...
@@ -11,10 +11,17 @@ import Foundation
...
@@ -11,10 +11,17 @@ import Foundation
#if DEBUG
#if DEBUG
//MARK: デバッグサーバー用
//MARK: デバッグサーバー用
enum
HttpRequestType
:
String
{
enum
HttpRequestType
:
String
{
case
RegisterLogin
=
"https://ssv-canary-web.azurewebsites.net/
app
login"
case
RegisterLogin
=
"https://ssv-canary-web.azurewebsites.net/
sailassist
login"
case
SitePolicy
=
"https://ssv-canary-web.azurewebsites.net/sitepolicy"
case
SitePolicy
=
"https://ssv-canary-web.azurewebsites.net/sitepolicy"
case
CookiePolicy
=
"https://ssv-canary-web.azurewebsites.net/cookiepolicy"
case
CookiePolicy
=
"https://ssv-canary-web.azurewebsites.net/cookiepolicy"
case
PrivacyPolicy
=
"https://ssv-canary-web.azurewebsites.net/inapp?"
//+バージョン番号
case
PrivacyPolicy
=
"https://ssv-canary-web.azurewebsites.net/inapp?"
//+バージョン番号
case
TaskList
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case
EcaArea
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/ecaarea"
case
ShipStatus
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/shipstatus/XXXXX"
case
ShipMonitoringRoute
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/shipmonitoringroute/XXXXX"
case
GetMessage
=
"https://ssv-canary-web.azurewebsites.net/api/chatdata/getmessages?shipId=XXXXX"
case
SignalR
=
"https://ssv-canary-web.azurewebsites.net/signalr/shore"
case
UploadImage
=
"https://ssv-canary-web.azurewebsites.net/api/chatdata/uploadimage"
}
}
#else
#else
//MARK: 運用サーバー用
//MARK: 運用サーバー用
...
...
Seilassist/Sailassist/Info.plist
View file @
a1620e01
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
<
k
e
y
>
MBXAccessToken
<
/k
e
y
>
<
k
e
y
>
MBXAccessToken
<
/k
e
y
>
<
string
>
pk.eyJ1Ijoiam1hcmluZWNsb3VkIiwiYSI6ImNsbmxjbGYzZjA0dG8yaW82MDgwajQ5OTQifQ.pd8YC9qK1C4YmMUbMx6ywQ
<
/string
>
<
string
>
pk.eyJ1Ijoiam1hcmluZWNsb3VkIiwiYSI6ImNsbmxjbGYzZjA0dG8yaW82MDgwajQ5OTQifQ.pd8YC9qK1C4YmMUbMx6ywQ
<
/string
>
<
k
e
y
>
UIBackgroundModes
<
/k
e
y
>
<
k
e
y
>
UIBackgroundModes
<
/k
e
y
>
<
a
rr
a
y/
>
<
a
rr
a
y
>
<
string
>
location
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
Seilassist/Sailassist/Json/ReqLogin.swift
View file @
a1620e01
...
@@ -8,11 +8,17 @@
...
@@ -8,11 +8,17 @@
import
Foundation
import
Foundation
struct
ReqLogin
:
Codable
{
struct
ReqLogin
:
Codable
{
var
I
d
:
String
var
i
d
:
String
var
P
assword
:
String
var
p
assword
:
String
init
(
Id
:
String
,
Password
:
String
)
{
init
(
Id
:
String
,
Password
:
String
)
{
self
.
I
d
=
Id
self
.
i
d
=
Id
self
.
P
assword
=
Password
self
.
p
assword
=
Password
}
}
}
}
struct
QrLogin
:
Codable
{
var
id
:
String
var
pass
:
String
var
exp
:
String
//有効期限
}
Seilassist/Sailassist/Json/ReqTaskList.swift
0 → 100644
View file @
a1620e01
//
// ReqTaskList.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
struct
ReqTaskList
:
Codable
{
var
areaId
:
Int
var
taskName
:
String
// var status:
}
Seilassist/Sailassist/Json/ResGetMessages.swift
0 → 100644
View file @
a1620e01
//
// ResGetMessages.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
struct
ResGetMessages
:
Codable
{
var
mode
:
Int
// 0:通常 , 1:Warning中
var
messages
:
[
message
]?
}
struct
message
:
Codable
{
var
shipId
:
UInt
var
messageId
:
String
//各メッセージ固有ID
var
type
:
Int
//0:テキスト , 1:スタンプ , 2:画像
var
time
:
String
//投稿日時
var
location
:
Int
//1:Shore , 2:Ship
var
from
:
String
//投稿者名
var
fromId
:
String
//ユーザーID
var
message
:
String
//テキスト時:テキスト , 画像時:サムネイルのUri
var
stampId
:
Int
//スタンプ番号 0:Fire~
var
viewer
:
[
view
]
//閲覧者情報
}
struct
view
:
Codable
{
var
time
:
String
//確認日時
var
location
:
Int
//1:Shore , 2:Ship
var
id
:
Int
//ユーザーID
}
Seilassist/Sailassist/Json/ResLogin.swift
View file @
a1620e01
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
import
Foundation
import
Foundation
struct
ResLogin
:
Codable
{
struct
ResLogin
:
Codable
{
var
I
d
:
Int
=
0
var
i
d
:
Int
=
0
var
Name
:
String
=
""
var
shipId
:
Int
=
0
var
CanUseCmap
:
Bool
=
false
var
shipName
:
String
=
""
var
CanCheckActiveRouteAlert
:
Bool
=
false
var
imo
:
Int
=
0
var
CanCheckBamAlert
:
Bool
=
false
var
mmsi
:
Int
=
0
}
}
Seilassist/Sailassist/Json/ResMonitoringRoute.swift
0 → 100644
View file @
a1620e01
//
// ResMonitoringRoute.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
struct
ResMonitoringRoute
:
Codable
{
var
wayPoints
:
[
points
]?
var
legLine
:
[
points
]?
var
portLine
:
[
points
]?
var
starboardLine
:
[
points
]?
}
struct
points
:
Codable
{
var
lat
:
Double
?
var
lon
:
Double
?
}
Seilassist/Sailassist/Json/ResShipStatus.swift
0 → 100644
View file @
a1620e01
//
// ResShipStatus.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/13.
//
import
Foundation
struct
ResShipStatus
:
Codable
{
var
dataTime
:
String
=
""
//2023-11-02T05:25:49.4362123Z
var
speed
:
Double
=
0.0
var
course
:
Double
=
0.0
var
heading
:
Double
=
0.0
var
lat
:
Double
=
0.0
var
lon
:
Double
=
0.0
}
Seilassist/Sailassist/LocationViewModel.swift
0 → 100644
View file @
a1620e01
//
// LocationViewModel.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/13.
//
import
CoreLocation
class
LocationViewModel
:
NSObject
,
ObservableObject
,
CLLocationManagerDelegate
{
@Published
var
authorizationStatus
:
CLAuthorizationStatus
@Published
var
lastSeenLocation
:
CLLocation
?
private
let
locationManager
:
CLLocationManager
override
init
()
{
locationManager
=
CLLocationManager
()
authorizationStatus
=
locationManager
.
authorizationStatus
super
.
init
()
locationManager
.
delegate
=
self
locationManager
.
activityType
=
.
automotiveNavigation
locationManager
.
distanceFilter
=
100
//100mぐらい移動したら位置情報取得
locationManager
.
desiredAccuracy
=
kCLLocationAccuracyBest
locationManager
.
allowsBackgroundLocationUpdates
=
true
// バックグラウンド実行中も座標取得する場合、trueにする
locationManager
.
pausesLocationUpdatesAutomatically
=
false
locationManager
.
startUpdatingLocation
()
}
func
requestPermission
()
{
locationManager
.
requestWhenInUseAuthorization
()
locationManager
.
requestAlwaysAuthorization
()
// バックグラウンド実行中も座標取得する場合はこちら
}
func
locationManagerDidChangeAuthorization
(
_
manager
:
CLLocationManager
)
{
authorizationStatus
=
manager
.
authorizationStatus
}
func
locationManager
(
_
manager
:
CLLocationManager
,
didUpdateLocations
locations
:
[
CLLocation
])
{
if
let
newLocation
=
locations
.
last
{
let
isLocation
=
filterLocation
(
newLocation
)
if
isLocation
{
lastSeenLocation
=
locations
.
first
let
targetCoordinate
:
CLLocationCoordinate2D
=
lastSeenLocation
!.
coordinate
SharingData
.
My
.
gps
=
targetCoordinate
}
}
}
func
filterLocation
(
_
location
:
CLLocation
)
->
Bool
{
let
intervalTime
=
-
location
.
timestamp
.
timeIntervalSinceNow
if
intervalTime
>
10
{
//位置情報を取得してから10秒以上
return
false
}
if
location
.
horizontalAccuracy
<
0
{
//水平方向の位置精度
return
false
}
if
location
.
horizontalAccuracy
>
100
{
//水平方向の誤差が100m
return
false
}
return
true
}
}
Seilassist/Sailassist/Login/LoginView.swift
View file @
a1620e01
...
@@ -36,6 +36,7 @@ struct LoginView: View {
...
@@ -36,6 +36,7 @@ struct LoginView: View {
@State
var
alertType
:
AlertType
=
.
loginFailure
@State
var
alertType
:
AlertType
=
.
loginFailure
@ObservedObject
var
scannerViewModel
=
ScannerViewModel
()
@ObservedObject
var
scannerViewModel
=
ScannerViewModel
()
@State
var
loginViewParam
=
LoginViewParam
()
@State
var
loginViewParam
=
LoginViewParam
()
@State
var
timer
:
Timer
?
var
sessionLogin
=
SessionLogin
()
var
sessionLogin
=
SessionLogin
()
var
body
:
some
View
{
var
body
:
some
View
{
...
@@ -141,10 +142,33 @@ struct LoginView: View {
...
@@ -141,10 +142,33 @@ struct LoginView: View {
print
(
debug
:
"calld"
)
print
(
debug
:
"calld"
)
switch
result
{
switch
result
{
case
.
success
(
let
resultData
):
case
.
success
(
let
resultData
):
let
jsonstr
=
String
(
data
:
resultData
,
encoding
:
.
utf8
)
!
let
serverSession
=
ServerSession
()
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResLogin
.
self
)
if
let
res
=
resjson
{
SharingData
.
My
.
id
=
res
.
id
SharingData
.
My
.
shipId
=
res
.
shipId
SharingData
.
My
.
shipName
=
res
.
shipName
SharingData
.
My
.
imo
=
res
.
imo
SharingData
.
My
.
mmsi
=
res
.
mmsi
}
Preferences
.
lastLoginDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
Preferences
.
lastLoginDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
isLogin
=
true
isLogin
=
true
timer
=
Timer
.
scheduledTimer
(
withTimeInterval
:
60.0
,
repeats
:
true
)
{
_
in
print
(
debug
:
"called timer"
)
let
eca
=
EcaTask
()
eca
.
start
()
let
message
=
GetMessage
()
message
.
start
()
let
route
=
MonitoringRoute
()
route
.
start
()
}
case
.
failure
(
let
errorCode
):
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
isLogin
=
false
isLogin
=
false
isAlert
=
true
isAlert
=
true
alertType
=
.
loginFailure
alertType
=
.
loginFailure
...
...
Seilassist/Sailassist/Login/View/InputUserNameView.swift
View file @
a1620e01
...
@@ -16,6 +16,7 @@ struct InputUserNameView: View {
...
@@ -16,6 +16,7 @@ struct InputUserNameView: View {
@Binding
var
isAlert
:
Bool
@Binding
var
isAlert
:
Bool
@Binding
var
alertType
:
AlertType
@Binding
var
alertType
:
AlertType
@State
private
var
isEmptyAlert
=
false
@State
private
var
isEmptyAlert
=
false
@State
var
timer
:
Timer
?
let
itemHPadding
:
Double
=
16
let
itemHPadding
:
Double
=
16
let
dialogBottomPadding
:
Double
=
32
let
dialogBottomPadding
:
Double
=
32
let
textFieldHeight
:
Double
=
40
let
textFieldHeight
:
Double
=
40
...
@@ -99,13 +100,36 @@ struct InputUserNameView: View {
...
@@ -99,13 +100,36 @@ struct InputUserNameView: View {
case
.
success
(
let
resultData
):
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
serverSession
=
ServerSession
()
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResLogin
.
self
)
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResLogin
.
self
)
if
let
res
=
resjson
{
SharingData
.
My
.
id
=
res
.
id
SharingData
.
My
.
shipId
=
res
.
shipId
SharingData
.
My
.
shipName
=
res
.
shipName
SharingData
.
My
.
imo
=
res
.
imo
SharingData
.
My
.
mmsi
=
res
.
mmsi
}
Preferences
.
ShipId
=
param
.
shipId
Preferences
.
ShipId
=
param
.
shipId
Preferences
.
ShipPassword
=
param
.
password
Preferences
.
ShipPassword
=
param
.
password
Preferences
.
lastLoginDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
Preferences
.
lastLoginDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
timer
=
Timer
.
scheduledTimer
(
withTimeInterval
:
60.0
,
repeats
:
true
)
{
_
in
print
(
debug
:
"called timer"
)
let
eca
=
EcaTask
()
eca
.
start
()
let
message
=
GetMessage
()
message
.
start
()
let
route
=
MonitoringRoute
()
route
.
start
()
}
isProgressView
=
false
isProgressView
=
false
isLogin
=
true
isLogin
=
true
isAlert
=
false
isAlert
=
false
case
.
failure
(
let
errorCode
):
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
isProgressView
=
false
isProgressView
=
false
isLogin
=
false
isLogin
=
false
isAlert
=
true
isAlert
=
true
...
...
Seilassist/Sailassist/Login/ViewModel/ScannerViewModel.swift
View file @
a1620e01
...
@@ -19,10 +19,11 @@ class ScannerViewModel: ObservableObject {
...
@@ -19,10 +19,11 @@ class ScannerViewModel: ObservableObject {
self
.
lastQrCode
=
code
self
.
lastQrCode
=
code
let
decoder
=
JSONDecoder
()
let
decoder
=
JSONDecoder
()
let
jsonData
=
self
.
lastQrCode
.
data
(
using
:
.
utf8
)
!
let
jsonData
=
self
.
lastQrCode
.
data
(
using
:
.
utf8
)
!
let
resjson
:
ReqLogin
=
try
decoder
.
decode
(
ReqLogin
.
self
,
from
:
jsonData
)
let
resjson
:
QrLogin
=
try
decoder
.
decode
(
QrLogin
.
self
,
from
:
jsonData
)
Preferences
.
ShipId
=
resjson
.
id
Preferences
.
ShipPassword
=
resjson
.
pass
Preferences
.
ShipId
=
resjson
.
Id
Preferences
.
ShipPassword
=
resjson
.
Password
Preferences
.
lastLoginDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
Preferences
.
lastLoginDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
}
catch
{
}
catch
{
print
(
debug
:
"decodeエラー"
)
print
(
debug
:
"decodeエラー"
)
...
...
Seilassist/Sailassist/Map/MonitoringRoute.swift
0 → 100644
View file @
a1620e01
//
// MonitoringRoute.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
import
CoreLocation
class
MonitoringRoute
{
var
sessionMonitoringRoute
=
SessionMonitoringRoute
()
func
start
()
{
print
(
debug
:
"called"
)
sessionMonitoringRoute
.
RequestMonitoringRoute
(
responseMonitoringRoute
)
}
private
func
responseMonitoringRoute
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResMonitoringRoute
.
self
)
if
let
res
=
resjson
{
SharingData
.
Map
.
wayPoints
=
[]
if
let
wayPoint
=
res
.
wayPoints
{
wayPoint
.
forEach
{
waypoint
in
var
point
:
CLLocationCoordinate2D
=
CLLocationCoordinate2D
()
point
.
latitude
=
CLLocationDegrees
(
waypoint
.
lat
??
0.0
)
point
.
longitude
=
CLLocationDegrees
(
waypoint
.
lon
??
0.0
)
SharingData
.
Map
.
wayPoints
.
append
(
point
)
}
}
SharingData
.
Map
.
legLine
=
[]
if
let
legLine
=
res
.
legLine
{
legLine
.
forEach
{
legline
in
var
point
:
CLLocationCoordinate2D
=
CLLocationCoordinate2D
()
point
.
latitude
=
CLLocationDegrees
(
legline
.
lat
??
0.0
)
point
.
longitude
=
CLLocationDegrees
(
legline
.
lon
??
0.0
)
SharingData
.
Map
.
legLine
.
append
(
point
)
}
}
SharingData
.
Map
.
portLine
=
[]
if
let
portLine
=
res
.
portLine
{
portLine
.
forEach
{
portline
in
var
point
:
CLLocationCoordinate2D
=
CLLocationCoordinate2D
()
point
.
latitude
=
CLLocationDegrees
(
portline
.
lat
??
0.0
)
point
.
longitude
=
CLLocationDegrees
(
portline
.
lon
??
0.0
)
SharingData
.
Map
.
portLine
.
append
(
point
)
}
}
SharingData
.
Map
.
starboardLine
=
[]
if
let
starboardLine
=
res
.
starboardLine
{
starboardLine
.
forEach
{
starboardline
in
var
point
:
CLLocationCoordinate2D
=
CLLocationCoordinate2D
()
point
.
latitude
=
CLLocationDegrees
(
starboardline
.
lat
??
0.0
)
point
.
longitude
=
CLLocationDegrees
(
starboardline
.
lon
??
0.0
)
SharingData
.
Map
.
starboardLine
.
append
(
point
)
}
}
}
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
break
}
}
}
Seilassist/Sailassist/Preferences/Preferences.swift
View file @
a1620e01
...
@@ -25,9 +25,6 @@ class Preferences{
...
@@ -25,9 +25,6 @@ class Preferences{
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipId.rawValue)
static
var
ShipId
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipId.rawValue)
static
var
ShipId
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipPassword.rawValue)
static
var
ShipPassword
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipPassword.rawValue)
static
var
ShipPassword
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.Mmsi.rawValue)
static
var
Mmsi
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipName.rawValue)
static
var
ShipName
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.GroupName.rawValue)
static
var
GroupName
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue)
static
var
UserName
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue)
static
var
UserName
:
String
// func getPreferences(key)
// func getPreferences(key)
...
...
Seilassist/Sailassist/Preferences/PreferencesKey.swift
View file @
a1620e01
...
@@ -14,9 +14,6 @@ class PreferencesKey{
...
@@ -14,9 +14,6 @@ class PreferencesKey{
enum
TypeString
:
String
{
enum
TypeString
:
String
{
case
ShipId
case
ShipId
case
ShipPassword
case
ShipPassword
case
Mmsi
case
ShipName
case
GroupName
case
UserName
case
UserName
}
}
...
...
Seilassist/Sailassist/RequestLocationView.swift
0 → 100644
View file @
a1620e01
//
// RequestLocationView.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/13.
//
import
SwiftUI
struct
RequestLocationView
:
View
{
@EnvironmentObject
var
locationViewModel
:
LocationViewModel
var
body
:
some
View
{
Button
(
action
:
{
locationViewModel
.
requestPermission
()
})
{
Text
(
"Allow use of location information."
)
}
}
}
struct
RequestLocationView_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
RequestLocationView
()
.
environmentObject
(
LocationViewModel
())
}
}
Seilassist/Sailassist/ServerSession/ServerSession.swift
View file @
a1620e01
...
@@ -78,6 +78,49 @@ class ServerSession{
...
@@ -78,6 +78,49 @@ class ServerSession{
})
.
resume
()
})
.
resume
()
}
}
func
getJson
(
_
req_url
:
URL
,
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
){
var
req
=
URLRequest
(
url
:
req_url
)
req
.
addValue
(
"application/json"
,
forHTTPHeaderField
:
"Content-Type"
)
req
.
timeoutInterval
=
20
// タイムアウト3秒 → Amedasでタイムアウトエラー20秒に変更
// サーバー送信
let
session
=
URLSession
(
configuration
:
.
default
,
delegate
:
nil
,
delegateQueue
:
OperationQueue
.
main
)
session
.
dataTask
(
with
:
req
,
completionHandler
:
{(
data
,
response
,
error
)
in
session
.
finishTasksAndInvalidate
()
do
{
if
let
error
=
error
{
let
err
=
APIError
.
clientError
throw
APIError
.
clientError
}
guard
let
indata
=
data
,
let
inresponse
=
response
as?
HTTPURLResponse
else
{
throw
APIError
.
responseError
}
if
inresponse
.
statusCode
!=
200
{
throw
APIError
.
serverError
}
//Cookieを保存
if
let
fields
=
inresponse
.
allHeaderFields
as?
[
String
:
String
],
let
url
=
inresponse
.
url
{
for
cookie
in
HTTPCookie
.
cookies
(
withResponseHeaderFields
:
fields
,
for
:
url
)
{
HTTPCookieStorage
.
shared
.
setCookie
(
cookie
)
}
}
DispatchQueue
.
main
.
async
{
completion
(
.
success
(
indata
))
}
}
catch
{
if
error
as?
APIError
!=
nil
{
completion
(
.
failure
(
error
as!
APIError
))
}
else
{
completion
(
.
failure
(
.
unknown
))
}
}
})
.
resume
()
}
// HTTPCookieStorageに特定のCookieが保存されているかを調べる
// HTTPCookieStorageに特定のCookieが保存されているかを調べる
func
isCookieSet
(
name
:
String
,
url
:
URL
)
->
Bool
{
func
isCookieSet
(
name
:
String
,
url
:
URL
)
->
Bool
{
if
let
cookies
=
HTTPCookieStorage
.
shared
.
cookies
(
for
:
url
)
{
if
let
cookies
=
HTTPCookieStorage
.
shared
.
cookies
(
for
:
url
)
{
...
...
Seilassist/Sailassist/ServerSession/SessionGetMessage.swift
0 → 100644
View file @
a1620e01
//
// SessionGetMessage.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
import
SwiftUI
class
SessionGetMessage
:
ObservableObject
{
@Published
var
status
=
false
// シングルトン宣言
static
let
OnlyOne
=
SessionGetMessage
()
private
var
serverSession
=
ServerSession
()
private
var
Calling
:
Bool
=
false
// 通信中
/**
* メッセージ
*/
func
RequestGetMessage
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
Calling
=
true
// リクエストURLの組み立て
let
id
=
SharingData
.
My
.
shipId
if
id
!=
0
{
var
url_string
:
String
=
HttpRequestType
.
GetMessage
.
rawValue
url_string
=
url_string
.
replacingOccurrences
(
of
:
"XXXXX"
,
with
:
String
(
id
))
guard
let
req_url
=
URL
(
string
:
url_string
)
else
{
Calling
=
false
return
}
serverSession
.
getJson
(
req_url
,
completion
:
completion
)
}
}
}
Seilassist/Sailassist/ServerSession/SessionMonitoringRoute.swift
0 → 100644
View file @
a1620e01
//
// SessionMonitoringRoute.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
import
SwiftUI
class
SessionMonitoringRoute
:
ObservableObject
{
@Published
var
status
=
false
// シングルトン宣言
static
let
OnlyOne
=
SessionMonitoringRoute
()
private
var
serverSession
=
ServerSession
()
private
var
Calling
:
Bool
=
false
// 通信中
/**
* Monitoring Route
*/
func
RequestMonitoringRoute
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
Calling
=
true
// リクエストURLの組み立て
let
id
=
SharingData
.
My
.
shipId
if
id
!=
0
{
var
url_string
:
String
=
HttpRequestType
.
ShipMonitoringRoute
.
rawValue
url_string
=
url_string
.
replacingOccurrences
(
of
:
"XXXXX"
,
with
:
String
(
id
))
guard
let
req_url
=
URL
(
string
:
url_string
)
else
{
Calling
=
false
return
}
serverSession
.
getJson
(
req_url
,
completion
:
completion
)
}
}
}
Seilassist/Sailassist/ServerSession/SessionShipStatus.swift
0 → 100644
View file @
a1620e01
//
// SessionShipStatus.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/14.
//
import
Foundation
import
SwiftUI
class
SessionShipStatus
:
ObservableObject
{
@Published
var
status
=
false
// シングルトン宣言
static
let
OnlyOne
=
SessionShipStatus
()
private
var
serverSession
=
ServerSession
()
private
var
Calling
:
Bool
=
false
// 通信中
/**
* 船情報
*/
func
RequestShipStatus
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
Calling
=
true
// リクエストURLの組み立て
let
id
=
SharingData
.
My
.
shipId
if
id
!=
0
{
var
url_string
:
String
=
HttpRequestType
.
ShipStatus
.
rawValue
url_string
=
url_string
.
replacingOccurrences
(
of
:
"XXXXX"
,
with
:
String
(
id
))
guard
let
req_url
=
URL
(
string
:
url_string
)
else
{
Calling
=
false
return
}
serverSession
.
getJson
(
req_url
,
completion
:
completion
)
}
}
}
Seilassist/Sailassist/ServerSession/SessionTaskList.swift
0 → 100644
View file @
a1620e01
//
// SessionTaskList.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/15.
//
import
Foundation
import
SwiftUI
class
SessionTaskList
:
ObservableObject
{
@Published
var
status
=
false
// シングルトン宣言
static
let
OnlyOne
=
SessionTaskList
()
private
var
serverSession
=
ServerSession
()
private
var
Calling
:
Bool
=
false
// 通信中
/**
* メッセージ
*/
func
RequestTaskList
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
Calling
=
true
// リクエストURLの組み立て
let
id
=
SharingData
.
My
.
shipId
if
id
!=
0
{
var
url_string
:
String
=
HttpRequestType
.
TaskList
.
rawValue
url_string
=
url_string
.
replacingOccurrences
(
of
:
"XXXXX"
,
with
:
String
(
id
))
guard
let
req_url
=
URL
(
string
:
url_string
)
else
{
Calling
=
false
return
}
serverSession
.
getJson
(
req_url
,
completion
:
completion
)
}
}
}
Seilassist/Sailassist/SharingData/SharingData.swift
View file @
a1620e01
...
@@ -22,6 +22,41 @@ class SharingData: ObservableObject{
...
@@ -22,6 +22,41 @@ class SharingData: ObservableObject{
}
}
class
My
{
static
var
location
:
CLLocationCoordinate2D
?
=
nil
static
var
gps
:
CLLocationCoordinate2D
?
=
nil
static
var
server
:
CLLocationCoordinate2D
?
=
nil
static
var
speed
:
Double
=
0.0
static
var
course
:
Double
=
0.0
static
var
heading
:
Double
=
0.0
static
var
dataTime
:
String
=
""
//2023-11-02T05:25:49.4362123Z
static
var
id
:
Int
=
0
static
var
shipId
:
Int
=
0
static
var
shipName
:
String
=
""
static
var
imo
:
Int
=
0
static
var
mmsi
:
Int
=
0
static
func
reset
()
{
location
=
nil
speed
=
0.0
course
=
0.0
heading
=
0.0
}
}
class
Map
{
static
var
wayPoints
:
[
CLLocationCoordinate2D
]
=
[]
static
var
legLine
:
[
CLLocationCoordinate2D
]
=
[]
static
var
portLine
:
[
CLLocationCoordinate2D
]
=
[]
static
var
starboardLine
:
[
CLLocationCoordinate2D
]
=
[]
}
class
Message
{
static
var
mode
:
Int
=
0
// 0:通常 , 1:Warning中
static
var
messages
:
[
message
]
=
[]
}
/**
/**
* Eca
* Eca
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment