From 4a7ea42cf340c791127fea49481fb7a91022898f Mon Sep 17 00:00:00 2001 From: Filippos Sakellaropoulos Date: Thu, 4 Jul 2024 01:01:04 +0300 Subject: [PATCH 1/2] Remove outdated documentation files --- Documentation/Reference/README.md | 25 --- .../classes/DefaultTransferDelegate.md | 91 ----------- Documentation/Reference/classes/Helpers.md | 85 ---------- .../classes/MdocGattServer.Delegate.md | 63 ------- .../Reference/classes/MdocGattServer.md | 154 ------------------ .../Reference/classes/MdocHelpers.md | 146 ----------------- .../Reference/enums/BleTransferMode.md | 46 ------ Documentation/Reference/enums/ErrorCode.md | 114 ------------- .../Reference/enums/InitializeKeys.md | 62 ------- .../enums/MdocServiceCharacteristic.md | 35 ---- .../Reference/enums/TransferStatus.md | 84 ---------- .../Reference/enums/UserRequestKeys.md | 49 ------ Documentation/Reference/extensions/Array.md | 13 -- .../extensions/MdocTransferManager.md | 54 ------ .../fluttenItemViewModels(__valid_).md | 5 - .../methods/nsItemsToViewModels(______).md | 5 - .../protocols/MdocOfflineDelegate.md | 28 ---- .../protocols/MdocTransferManager.md | 113 ------------- .../Reference/structs/DocElementsViewModel.md | 40 ----- .../Reference/structs/ElementViewModel.md | 54 ------ .../Reference/typealiases/RequestItems.md | 7 - 21 files changed, 1273 deletions(-) delete mode 100644 Documentation/Reference/README.md delete mode 100644 Documentation/Reference/classes/DefaultTransferDelegate.md delete mode 100644 Documentation/Reference/classes/Helpers.md delete mode 100644 Documentation/Reference/classes/MdocGattServer.Delegate.md delete mode 100644 Documentation/Reference/classes/MdocGattServer.md delete mode 100644 Documentation/Reference/classes/MdocHelpers.md delete mode 100644 Documentation/Reference/enums/BleTransferMode.md delete mode 100644 Documentation/Reference/enums/ErrorCode.md delete mode 100644 Documentation/Reference/enums/InitializeKeys.md delete mode 100644 Documentation/Reference/enums/MdocServiceCharacteristic.md delete mode 100644 Documentation/Reference/enums/TransferStatus.md delete mode 100644 Documentation/Reference/enums/UserRequestKeys.md delete mode 100644 Documentation/Reference/extensions/Array.md delete mode 100644 Documentation/Reference/extensions/MdocTransferManager.md delete mode 100644 Documentation/Reference/methods/fluttenItemViewModels(__valid_).md delete mode 100644 Documentation/Reference/methods/nsItemsToViewModels(______).md delete mode 100644 Documentation/Reference/protocols/MdocOfflineDelegate.md delete mode 100644 Documentation/Reference/protocols/MdocTransferManager.md delete mode 100644 Documentation/Reference/structs/DocElementsViewModel.md delete mode 100644 Documentation/Reference/structs/ElementViewModel.md delete mode 100644 Documentation/Reference/typealiases/RequestItems.md diff --git a/Documentation/Reference/README.md b/Documentation/Reference/README.md deleted file mode 100644 index 42ede7a..0000000 --- a/Documentation/Reference/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Reference Documentation - -## Protocols - -- [MdocOfflineDelegate](protocols/MdocOfflineDelegate.md) - -## Classes - -- [MdocGattServer](classes/MdocGattServer.md) -- [MdocHelpers](classes/MdocHelpers.md) - -## Enums - -- [BleTransferMode](enums/BleTransferMode.md) -- [ErrorCode](enums/ErrorCode.md) -- [InitializeKeys](enums/InitializeKeys.md) -- [MdocServiceCharacteristic](enums/MdocServiceCharacteristic.md) -- [TransferStatus](enums/TransferStatus.md) -- [UserRequestKeys](enums/UserRequestKeys.md) - -## Typealiases - -- [RequestItems](typealiases/RequestItems.md) - -This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2024-05-15 12:11:06 +0000 diff --git a/Documentation/Reference/classes/DefaultTransferDelegate.md b/Documentation/Reference/classes/DefaultTransferDelegate.md deleted file mode 100644 index e16184d..0000000 --- a/Documentation/Reference/classes/DefaultTransferDelegate.md +++ /dev/null @@ -1,91 +0,0 @@ -**CLASS** - -# `DefaultTransferDelegate` - -**Contents** - -- [Properties](#properties) - - `readerCertIsserMessage` - - `readerCertValidationMessage` - - `hasError` - - `errorMessage` - - `selectedRequestItems` - - `status` - - `handleSelected` -- [Methods](#methods) - - `init(readerCertIsserMessage:readerCertValidationMessage:hasError:errorMessage:selectedRequestItems:handleSelected:)` - - `didChangeStatus(_:)` - - `didReceiveRequest(_:handleSelected:)` - - `didFinishedWithError(_:)` - -```swift -public class DefaultTransferDelegate: ObservableObject, MdocOfflineDelegate -``` - -## Properties -### `readerCertIsserMessage` - -```swift -@Published public var readerCertIsserMessage: String? -``` - -### `readerCertValidationMessage` - -```swift -@Published public var readerCertValidationMessage: String? -``` - -### `hasError` - -```swift -@Published public var hasError: Bool = false -``` - -### `errorMessage` - -```swift -@Published public var errorMessage: String = "" -``` - -### `selectedRequestItems` - -```swift -@Published public var selectedRequestItems: [DocElementsViewModel] = [] -``` - -### `status` - -```swift -@Published public var status: TransferStatus = .initializing -``` - -### `handleSelected` - -```swift -public var handleSelected: (Bool, RequestItems?) -> Void = { _,_ in } -``` - -## Methods -### `init(readerCertIsserMessage:readerCertValidationMessage:hasError:errorMessage:selectedRequestItems:handleSelected:)` - -```swift -public init(readerCertIsserMessage: String? = nil, readerCertValidationMessage: String? = nil, hasError: Bool = false, errorMessage: String = "", selectedRequestItems: [DocElementsViewModel] = [], handleSelected: @escaping (Bool, RequestItems?) -> Void = { _,_ in }) -``` - -### `didChangeStatus(_:)` - -```swift -public func didChangeStatus(_ newStatus: TransferStatus) -``` - -### `didReceiveRequest(_:handleSelected:)` - -```swift -public func didReceiveRequest(_ request: [String: Any], handleSelected: @escaping (Bool, RequestItems?) -> Void) -``` - -### `didFinishedWithError(_:)` - -```swift -public func didFinishedWithError(_ error: Error) -``` diff --git a/Documentation/Reference/classes/Helpers.md b/Documentation/Reference/classes/Helpers.md deleted file mode 100644 index 35827e4..0000000 --- a/Documentation/Reference/classes/Helpers.md +++ /dev/null @@ -1,85 +0,0 @@ -**CLASS** - -# `Helpers` - -**Contents** - -- [Methods](#methods) - - `CountNumBlocks(dataLength:maxBlockSize:)` - - `CreateBlockCommand(data:blockId:maxBlockSize:)` - - `checkBleAccess(_:action:)` - - `checkCameraAccess(_:action:)` - - `presentSettings(_:msg:)` - - `getTopViewController(base:)` - -```swift -public class Helpers -``` - -Helper methods - -## Methods -### `CountNumBlocks(dataLength:maxBlockSize:)` - -```swift -public static func CountNumBlocks(dataLength: Int, maxBlockSize: Int) -> Int -``` - -Returns the number of blocks that dataLength bytes of data can be split into, given a maximum block size of maxBlockSize bytes. -- Parameters: - - dataLength: Length of data to be split - - maxBlockSize: The maximum block size -- Returns: Number of blocks - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| dataLength | Length of data to be split | -| maxBlockSize | The maximum block size | - -### `CreateBlockCommand(data:blockId:maxBlockSize:)` - -```swift -public static func CreateBlockCommand(data: Data, blockId: Int, maxBlockSize: Int) -> (Data, Bool) -``` - -Creates a block for a given block id from a data object. The block size is limited to maxBlockSize bytes. -- Parameters: - - data: The data object to be sent - - blockId: The id (number) of the block to be sent - - maxBlockSize: The maximum block size -- Returns: (chunk:The data block, bEnd: True if this is the last block, false otherwise) - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| data | The data object to be sent | -| blockId | The id (number) of the block to be sent | -| maxBlockSize | The maximum block size | - -### `checkBleAccess(_:action:)` - -Check if BLE access is allowed, and if not, present a dialog that opens settings -- Parameters: - - vc: The view controller that will present the settings - - action: The action to perform - -### `checkCameraAccess(_:action:)` - -Check if the user has given permission to access the camera. If not, ask them to go to the settings app to give permission. -- Parameters: - - vc: The view controller that will present the settings - - action: The action to perform - -### `presentSettings(_:msg:)` - -Present an alert controller with a message, and two actions, one to cancel, and one to go to the settings page. -- Parameters: - - vc: The view controller that will present the settings - - msg: The message to show - -### `getTopViewController(base:)` - -Finds the top view controller in the view hierarchy of the app. It is used to present a new view controller on top of any existing view controllers. diff --git a/Documentation/Reference/classes/MdocGattServer.Delegate.md b/Documentation/Reference/classes/MdocGattServer.Delegate.md deleted file mode 100644 index b211e6f..0000000 --- a/Documentation/Reference/classes/MdocGattServer.Delegate.md +++ /dev/null @@ -1,63 +0,0 @@ -**CLASS** - -# `MdocGattServer.Delegate` - -**Contents** - -- [Properties](#properties) - - `server` -- [Methods](#methods) - - `init(server:)` - - `peripheralManagerIsReady(toUpdateSubscribers:)` - - `peripheralManagerDidUpdateState(_:)` - - `peripheralManager(_:didReceiveWrite:)` - - `peripheralManager(_:central:didSubscribeTo:)` - - `peripheralManager(_:central:didUnsubscribeFrom:)` - -```swift -class Delegate: NSObject, CBPeripheralManagerDelegate -``` - -## Properties -### `server` - -```swift -unowned var server: MdocGattServer -``` - -## Methods -### `init(server:)` - -```swift -init(server: MdocGattServer) -``` - -### `peripheralManagerIsReady(toUpdateSubscribers:)` - -```swift -func peripheralManagerIsReady(toUpdateSubscribers peripheral: CBPeripheralManager) -``` - -### `peripheralManagerDidUpdateState(_:)` - -```swift -func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) -``` - -### `peripheralManager(_:didReceiveWrite:)` - -```swift -func peripheralManager(_ peripheral: CBPeripheralManager, didReceiveWrite requests: [CBATTRequest]) -``` - -### `peripheralManager(_:central:didSubscribeTo:)` - -```swift -public func peripheralManager(_ peripheral: CBPeripheralManager, central: CBCentral, didSubscribeTo characteristic: CBCharacteristic) -``` - -### `peripheralManager(_:central:didUnsubscribeFrom:)` - -```swift -public func peripheralManager(_ peripheral: CBPeripheralManager, central: CBCentral, didUnsubscribeFrom characteristic: CBCharacteristic) -``` diff --git a/Documentation/Reference/classes/MdocGattServer.md b/Documentation/Reference/classes/MdocGattServer.md deleted file mode 100644 index d913494..0000000 --- a/Documentation/Reference/classes/MdocGattServer.md +++ /dev/null @@ -1,154 +0,0 @@ -**CLASS** - -# `MdocGattServer` - -**Contents** - -- [Properties](#properties) - - `deviceEngagement` - - `deviceRequest` - - `sessionEncryption` - - `docs` - - `iaca` - - `devicePrivateKey` - - `readerName` - - `qrCodeImageData` - - `delegate` - - `advertising` - - `error` - - `status` - - `isBlePoweredOn` - - `isBlePermissionDenied` -- [Methods](#methods) - - `init(parameters:)` - - `performDeviceEngagement(rfus:)` - - `stop()` - - `userSelected(_:_:)` - -```swift -public class MdocGattServer: ObservableObject -``` - -BLE Gatt server implementation of mdoc transfer manager - -## Properties -### `deviceEngagement` - -```swift -public var deviceEngagement: DeviceEngagement? -``` - -### `deviceRequest` - -```swift -public var deviceRequest: DeviceRequest? -``` - -### `sessionEncryption` - -```swift -public var sessionEncryption: SessionEncryption? -``` - -### `docs` - -```swift -public var docs: [DeviceResponse]! -``` - -### `iaca` - -```swift -public var iaca: [SecCertificate]! -``` - -### `devicePrivateKeys` - -```swift -public var devicePrivateKeys: [CoseKeyPrivate]! -``` - -### `dauthMethod` - -```swift -public var dauthMethod: DeviceAuthMethod -``` - -### `readerName` - -```swift -public var readerName: String? -``` - -### `qrCodePayload` - -```swift -public var qrCodePayload: String? -``` - -### `delegate` - -```swift -public weak var delegate: (any MdocOfflineDelegate)? -``` - -### `advertising` - -```swift -public var advertising: Bool = false -``` - -### `error` - -```swift -public var error: Error? = nil -``` - -### `status` - -```swift -public var status: TransferStatus = .initializing -``` - -### `isBlePoweredOn` - -```swift -public var isBlePoweredOn: Bool -``` - -Returns true if the peripheralManager state is poweredOn - -### `isBlePermissionDenied` - -```swift -public var isBlePermissionDenied: Bool -``` - -Returns true if the peripheralManager state is unauthorized - -## Methods -### `init(parameters:)` - -```swift -public init(parameters: [String: Any]) throws -``` - -### `performDeviceEngagement(rfus:)` - -```swift -public func performDeviceEngagement(rfus: [String]? = nil) -``` - -``qrCodePayload`` is set to QR code data corresponding to the device engagement. - -### `stop()` - -```swift -public func stop() -``` - -### `userSelected(_:_:)` - -```swift -public func userSelected(_ b: Bool, _ items: RequestItems?) -``` diff --git a/Documentation/Reference/classes/MdocHelpers.md b/Documentation/Reference/classes/MdocHelpers.md deleted file mode 100644 index cc96a10..0000000 --- a/Documentation/Reference/classes/MdocHelpers.md +++ /dev/null @@ -1,146 +0,0 @@ -**CLASS** - -# `MdocHelpers` - -**Contents** - -- [Methods](#methods) - - `initializeData(parameters:)` - - `makeError(code:str:)` - - `getSessionDataToSend(sessionEncryption:status:docToSend:)` - - `decodeRequestAndInformUser(deviceEngagement:docs:iaca:requestData:devicePrivateKey:readerKeyRawData:handOver:)` - - `getDeviceResponseToSend(deviceRequest:deviceResponses:selectedItems:sessionEncryption:eReaderKey:devicePrivateKey:)` - - `CountNumBlocks(dataLength:maxBlockSize:)` - - `CreateBlockCommand(data:blockId:maxBlockSize:)` - - `checkBleAccess(_:action:)` - - `checkCameraAccess(_:action:)` - - `presentSettings(_:msg:)` - - `getTopViewController(base:)` - - `getCN(from:)` - -```swift -public class MdocHelpers -``` - -Helper methods - -## Methods -### `initializeData(parameters:)` - -```swift -public static func initializeData(parameters: [String: Any]) -> (docs: [DeviceResponse], devicePrivateKeys: [CoseKeyPrivate], iaca: [SecCertificate]?, dauthMethod: DeviceAuthMethod)? -``` - -### `makeError(code:str:)` - -```swift -public static func makeError(code: ErrorCode, str: String? = nil) -> NSError -``` - -### `getSessionDataToSend(sessionEncryption:status:docToSend:)` - -```swift -public static func getSessionDataToSend(sessionEncryption: SessionEncryption?, status: TransferStatus, docToSend: DeviceResponse) -> Result -``` - -### `decodeRequestAndInformUser(deviceEngagement:docs:iaca:requestData:devicePrivateKeys:dauthMethod:readerKeyRawData:handOver:)` - -```swift -public static func decodeRequestAndInformUser(deviceEngagement: DeviceEngagement?, docs: [DeviceResponse], iaca: [SecCertificate], requestData: Data, devicePrivateKeys: [CoseKeyPrivate], dauthMethod: DeviceAuthMethod, readerKeyRawData: [UInt8]?, handOver: CBOR) -> Result<(sessionEncryption: SessionEncryption, deviceRequest: DeviceRequest, params: [String: Any], isValidRequest: Bool), Error> -``` - -Decrypt the contents of a data object and return a ``DeviceRequest`` object if the data represents a valid device request. If the data does not represent a valid device request, the function returns nil. -- Parameters: - - requestData: Request data passed to the mdoc holder - - handler: Handler to call with the accept/reject flag - - devicePrivateKey: Device private key - - readerKeyRawData: reader key cbor data (if reader engagement is used) -- Returns: A ``DeviceRequest`` object - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| requestData | Request data passed to the mdoc holder | -| handler | Handler to call with the accept/reject flag | -| devicePrivateKey | Device private key | -| readerKeyRawData | reader key cbor data (if reader engagement is used) | - -### `getDeviceResponseToSend(deviceRequest:deviceResponses:selectedItems:sessionEncryption:eReaderKey:devicePrivateKeys:dauthMethod:)` - -```swift -public static func getDeviceResponseToSend(deviceRequest: DeviceRequest?, deviceResponses: [DeviceResponse], selectedItems: RequestItems? = nil, sessionEncryption: SessionEncryption? = nil, eReaderKey: CoseKey? = nil, devicePrivateKeys: [CoseKeyPrivate], dauthMethod: DeviceAuthMethod) throws -> (response: DeviceResponse, validRequestItems: RequestItems, errorRequestItems: RequestItems)? -``` - -### `CountNumBlocks(dataLength:maxBlockSize:)` - -```swift -public static func CountNumBlocks(dataLength: Int, maxBlockSize: Int) -> Int -``` - -Returns the number of blocks that dataLength bytes of data can be split into, given a maximum block size of maxBlockSize bytes. -- Parameters: - - dataLength: Length of data to be split - - maxBlockSize: The maximum block size -- Returns: Number of blocks - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| dataLength | Length of data to be split | -| maxBlockSize | The maximum block size | - -### `CreateBlockCommand(data:blockId:maxBlockSize:)` - -```swift -public static func CreateBlockCommand(data: Data, blockId: Int, maxBlockSize: Int) -> (Data, Bool) -``` - -Creates a block for a given block id from a data object. The block size is limited to maxBlockSize bytes. -- Parameters: - - data: The data object to be sent - - blockId: The id (number) of the block to be sent - - maxBlockSize: The maximum block size -- Returns: (chunk:The data block, bEnd: True if this is the last block, false otherwise) - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| data | The data object to be sent | -| blockId | The id (number) of the block to be sent | -| maxBlockSize | The maximum block size | - -### `checkBleAccess(_:action:)` - -Check if BLE access is allowed, and if not, present a dialog that opens settings -- Parameters: - - vc: The view controller that will present the settings - - action: The action to perform - -### `checkCameraAccess(_:action:)` - -Check if the user has given permission to access the camera. If not, ask them to go to the settings app to give permission. -- Parameters: - - vc: The view controller that will present the settings - - action: The action to perform - -### `presentSettings(_:msg:)` - -Present an alert controller with a message, and two actions, one to cancel, and one to go to the settings page. -- Parameters: - - vc: The view controller that will present the settings - - msg: The message to show - -### `getTopViewController(base:)` - -Finds the top view controller in the view hierarchy of the app. It is used to present a new view controller on top of any existing view controllers. - -### `getCN(from:)` - -```swift -public static func getCN(from dn: String) -> String -``` - -Get the common name (CN) from the certificate distringuished name (DN) diff --git a/Documentation/Reference/enums/BleTransferMode.md b/Documentation/Reference/enums/BleTransferMode.md deleted file mode 100644 index 6d58613..0000000 --- a/Documentation/Reference/enums/BleTransferMode.md +++ /dev/null @@ -1,46 +0,0 @@ -**ENUM** - -# `BleTransferMode` - -**Contents** - -- [Cases](#cases) - - `server` - - `client` -- [Properties](#properties) - - `BASE_UUID_SUFFIX_SERVICE` - - `QRHandover` - -```swift -public enum BleTransferMode -``` - -The enum BleTransferMode defines the two roles in the communication, which can be a server or a client. - -The four static variables are used to signal the start and the end of the communication. This is done by sending the bytes 0x01 and 0x02 for the start and end of the communication, respectively. For the start and end of the data transmission, the bytes 0x01 and 0x00 are used. - -## Cases -### `server` - -```swift -case server -``` - -### `client` - -```swift -case client -``` - -## Properties -### `BASE_UUID_SUFFIX_SERVICE` - -```swift -public static let BASE_UUID_SUFFIX_SERVICE = "-0000-1000-8000-00805F9B34FB" -``` - -### `QRHandover` - -```swift -public static let QRHandover = CBOR.null -``` diff --git a/Documentation/Reference/enums/ErrorCode.md b/Documentation/Reference/enums/ErrorCode.md deleted file mode 100644 index 9d7544f..0000000 --- a/Documentation/Reference/enums/ErrorCode.md +++ /dev/null @@ -1,114 +0,0 @@ -**ENUM** - -# `ErrorCode` - -**Contents** - -- [Cases](#cases) - - `documents_not_provided` - - `invalidInputDocument` - - `invalidUrl` - - `device_private_key_not_provided` - - `noDocumentToReturn` - - `userRejected` - - `requestDecodeError` - - `bleNotAuthorized` - - `bleNotSupported` - - `unexpected_error` - - `sessionEncryptionNotInitialized` - - `deviceEngagementMissing` - - `readerKeyMissing` -- [Properties](#properties) - - `description` - -```swift -public enum ErrorCode: Int, CustomStringConvertible -``` - -Possible error codes - -## Cases -### `documents_not_provided` - -```swift -case documents_not_provided -``` - -### `invalidInputDocument` - -```swift -case invalidInputDocument -``` - -### `invalidUrl` - -```swift -case invalidUrl -``` - -### `device_private_key_not_provided` - -```swift -case device_private_key_not_provided -``` - -### `noDocumentToReturn` - -```swift -case noDocumentToReturn -``` - -### `userRejected` - -```swift -case userRejected -``` - -### `requestDecodeError` - -```swift -case requestDecodeError -``` - -### `bleNotAuthorized` - -```swift -case bleNotAuthorized -``` - -### `bleNotSupported` - -```swift -case bleNotSupported -``` - -### `unexpected_error` - -```swift -case unexpected_error -``` - -### `sessionEncryptionNotInitialized` - -```swift -case sessionEncryptionNotInitialized -``` - -### `deviceEngagementMissing` - -```swift -case deviceEngagementMissing -``` - -### `readerKeyMissing` - -```swift -case readerKeyMissing -``` - -## Properties -### `description` - -```swift -public var description: String -``` diff --git a/Documentation/Reference/enums/InitializeKeys.md b/Documentation/Reference/enums/InitializeKeys.md deleted file mode 100644 index b7669da..0000000 --- a/Documentation/Reference/enums/InitializeKeys.md +++ /dev/null @@ -1,62 +0,0 @@ -**ENUM** - -# `InitializeKeys` - -**Contents** - -- [Cases](#cases) - - `document_json_data` - - `document_signup_response_data` - - `document_signup_response_obj` - - `device_private_key_data` - - `device_private_key_obj` - - `trusted_certificates` - -```swift -public enum InitializeKeys: String -``` - -String keys for the initialization dictionary - -## Cases -### `document_json_data` - -```swift -case document_json_data -``` - -### `document_signup_response_data` - -```swift -case document_signup_response_data -``` - -### `document_signup_response_obj` - -```swift -case document_signup_response_obj -``` - -### `device_private_key_data` - -```swift -case device_private_key_data -``` - -### `device_private_key_obj` - -```swift -case device_private_key_obj -``` - -### `trusted_certificates` - -```swift -case trusted_certificates -``` - -### `device_auth_method` - -```swift -case device_auth_method -``` diff --git a/Documentation/Reference/enums/MdocServiceCharacteristic.md b/Documentation/Reference/enums/MdocServiceCharacteristic.md deleted file mode 100644 index 6c1dfdb..0000000 --- a/Documentation/Reference/enums/MdocServiceCharacteristic.md +++ /dev/null @@ -1,35 +0,0 @@ -**ENUM** - -# `MdocServiceCharacteristic` - -**Contents** - -- [Cases](#cases) - - `state` - - `client2Server` - - `server2Client` - -```swift -public enum MdocServiceCharacteristic: String -``` - -mdoc service characteristic definitions (mdoc is the GATT server) - -## Cases -### `state` - -```swift -case state = "00000001-A123-48CE-896B-4C76973373E6" -``` - -### `client2Server` - -```swift -case client2Server = "00000002-A123-48CE-896B-4C76973373E6" -``` - -### `server2Client` - -```swift -case server2Client = "00000003-A123-48CE-896B-4C76973373E6" -``` diff --git a/Documentation/Reference/enums/TransferStatus.md b/Documentation/Reference/enums/TransferStatus.md deleted file mode 100644 index 43c5a40..0000000 --- a/Documentation/Reference/enums/TransferStatus.md +++ /dev/null @@ -1,84 +0,0 @@ -**ENUM** - -# `TransferStatus` - -**Contents** - -- [Cases](#cases) - - `initializing` - - `initialized` - - `qrEngagementReady` - - `connected` - - `started` - - `requestReceived` - - `userSelected` - - `responseSent` - - `disconnected` - - `error` - -```swift -public enum TransferStatus: String -``` - -Transfer status enumeration - -## Cases -### `initializing` - -```swift -case initializing -``` - -### `initialized` - -```swift -case initialized -``` - -### `qrEngagementReady` - -```swift -case qrEngagementReady -``` - -### `connected` - -```swift -case connected -``` - -### `started` - -```swift -case started -``` - -### `requestReceived` - -```swift -case requestReceived -``` - -### `userSelected` - -```swift -case userSelected -``` - -### `responseSent` - -```swift -case responseSent -``` - -### `disconnected` - -```swift -case disconnected -``` - -### `error` - -```swift -case error -``` diff --git a/Documentation/Reference/enums/UserRequestKeys.md b/Documentation/Reference/enums/UserRequestKeys.md deleted file mode 100644 index 8163728..0000000 --- a/Documentation/Reference/enums/UserRequestKeys.md +++ /dev/null @@ -1,49 +0,0 @@ -**ENUM** - -# `UserRequestKeys` - -**Contents** - -- [Cases](#cases) - - `valid_items_requested` - - `error_items_requested` - - `reader_certificate_issuer` - - `reader_auth_validated` - - `reader_certificate_validation_message` - -```swift -public enum UserRequestKeys: String -``` - -String keys for the user request dictionary - -## Cases -### `valid_items_requested` - -```swift -case valid_items_requested -``` - -### `error_items_requested` - -```swift -case error_items_requested -``` - -### `reader_certificate_issuer` - -```swift -case reader_certificate_issuer -``` - -### `reader_auth_validated` - -```swift -case reader_auth_validated -``` - -### `reader_certificate_validation_message` - -```swift -case reader_certificate_validation_message -``` diff --git a/Documentation/Reference/extensions/Array.md b/Documentation/Reference/extensions/Array.md deleted file mode 100644 index 0f7aa93..0000000 --- a/Documentation/Reference/extensions/Array.md +++ /dev/null @@ -1,13 +0,0 @@ -**EXTENSION** - -# `Array` -```swift -extension Array where Element == DocElementsViewModel -``` - -## Properties -### `docSelectedDictionary` - -```swift -public var docSelectedDictionary: RequestItems -``` diff --git a/Documentation/Reference/extensions/MdocTransferManager.md b/Documentation/Reference/extensions/MdocTransferManager.md deleted file mode 100644 index ca5dc06..0000000 --- a/Documentation/Reference/extensions/MdocTransferManager.md +++ /dev/null @@ -1,54 +0,0 @@ -**EXTENSION** - -# `MdocTransferManager` -```swift -extension MdocTransferManager -``` - -## Methods -### `initialize(parameters:)` - -```swift -public func initialize(parameters: [String: Any]) -``` - -### `decodeRequestAndInformUser(requestData:devicePrivateKey:readerKeyRawData:handOver:handler:)` - -```swift -public func decodeRequestAndInformUser(requestData: Data, devicePrivateKey: CoseKeyPrivate, readerKeyRawData: [UInt8]?, handOver: CBOR, handler: @escaping (Bool, RequestItems?) -> Void) -> DeviceRequest? -``` - -Decrypt the contents of a data object and return a ``DeviceRequest`` object if the data represents a valid device request. If the data does not represent a valid device request, the function returns nil. -- Parameters: - - requestData: Request data passed to the mdoc holder - - handler: Handler to call with the accept/reject flag - - devicePrivateKey: Device private key - - readerKeyRawData: reader key cbor data (if reader engagement is used) -- Returns: A ``DeviceRequest`` object - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| requestData | Request data passed to the mdoc holder | -| handler | Handler to call with the accept/reject flag | -| devicePrivateKey | Device private key | -| readerKeyRawData | reader key cbor data (if reader engagement is used) | - -### `getDeviceResponseToSend(_:selectedItems:eReaderKey:devicePrivateKey:)` - -```swift -@discardableResult public func getDeviceResponseToSend(_ deviceRequest: DeviceRequest?, selectedItems: RequestItems?, eReaderKey: CoseKey?, devicePrivateKey: CoseKeyPrivate) throws -> DeviceResponse? -``` - -### `getSessionDataToSend(_:eReaderKey:)` - -```swift -public func getSessionDataToSend(_ deviceRequest: DeviceRequest, eReaderKey: CoseKey) -> Data? -``` - -### `makeError(code:str:)` - -```swift -public static func makeError(code: ErrorCode, str: String? = nil) -> NSError -``` diff --git a/Documentation/Reference/methods/fluttenItemViewModels(__valid_).md b/Documentation/Reference/methods/fluttenItemViewModels(__valid_).md deleted file mode 100644 index 5d77ffa..0000000 --- a/Documentation/Reference/methods/fluttenItemViewModels(__valid_).md +++ /dev/null @@ -1,5 +0,0 @@ -### `fluttenItemViewModels(_:valid:)` - -```swift -func fluttenItemViewModels(_ nsItems: [String:[String]], valid isEnabled: Bool) -> [ElementViewModel] -``` diff --git a/Documentation/Reference/methods/nsItemsToViewModels(______).md b/Documentation/Reference/methods/nsItemsToViewModels(______).md deleted file mode 100644 index d46b6f4..0000000 --- a/Documentation/Reference/methods/nsItemsToViewModels(______).md +++ /dev/null @@ -1,5 +0,0 @@ -### `nsItemsToViewModels(_:_:_:)` - -```swift -func nsItemsToViewModels(_ ns: String, _ items: [String], _ isEnabled: Bool) -> [ElementViewModel] -``` diff --git a/Documentation/Reference/protocols/MdocOfflineDelegate.md b/Documentation/Reference/protocols/MdocOfflineDelegate.md deleted file mode 100644 index f6de883..0000000 --- a/Documentation/Reference/protocols/MdocOfflineDelegate.md +++ /dev/null @@ -1,28 +0,0 @@ -**PROTOCOL** - -# `MdocOfflineDelegate` - -```swift -public protocol MdocOfflineDelegate: AnyObject -``` - -delegate protocol for clients of the mdoc offline transfer manager - -## Methods -### `didChangeStatus(_:)` - -```swift -func didChangeStatus(_ newStatus: TransferStatus) -``` - -### `didFinishedWithError(_:)` - -```swift -func didFinishedWithError(_ error: Error) -``` - -### `didReceiveRequest(_:handleSelected:)` - -```swift -func didReceiveRequest(_ request: [String: Any], handleSelected: @escaping (Bool, RequestItems?) -> Void) -``` diff --git a/Documentation/Reference/protocols/MdocTransferManager.md b/Documentation/Reference/protocols/MdocTransferManager.md deleted file mode 100644 index 448b283..0000000 --- a/Documentation/Reference/protocols/MdocTransferManager.md +++ /dev/null @@ -1,113 +0,0 @@ -**PROTOCOL** - -# `MdocTransferManager` - -```swift -public protocol MdocTransferManager: AnyObject -``` - -Protocol for a transfer manager object used to transfer data to and from the Mdoc holder. - -## Properties -### `status` - -```swift -var status: TransferStatus -``` - -### `deviceEngagement` - -```swift -var deviceEngagement: DeviceEngagement? -``` - -### `requireUserAccept` - -```swift -var requireUserAccept: Bool -``` - -### `sessionEncryption` - -```swift -var sessionEncryption: SessionEncryption? -``` - -### `deviceRequest` - -```swift -var deviceRequest: DeviceRequest? -``` - -### `deviceResponseToSend` - -```swift -var deviceResponseToSend: DeviceResponse? -``` - -### `validRequestItems` - -```swift -var validRequestItems: RequestItems? -``` - -### `errorRequestItems` - -```swift -var errorRequestItems: RequestItems? -``` - -### `delegate` - -```swift -var delegate: MdocOfflineDelegate? -``` - -### `docs` - -```swift -var docs: [DeviceResponse]! -``` - -### `devicePrivateKey` - -```swift -var devicePrivateKey: CoseKeyPrivate! -``` - -### `iaca` - -```swift -var iaca: [SecCertificate]! -``` - -### `error` - -```swift -var error: Error? -``` - -### `readerName` - -```swift -var readerName: String? -``` - -## Methods -### `initialize(parameters:)` - -```swift -func initialize(parameters: [String: Any]) -``` - -### `performDeviceEngagement()` - -```swift -func performDeviceEngagement() -``` - -### `stop()` - -```swift -func stop() -``` diff --git a/Documentation/Reference/structs/DocElementsViewModel.md b/Documentation/Reference/structs/DocElementsViewModel.md deleted file mode 100644 index eec5f29..0000000 --- a/Documentation/Reference/structs/DocElementsViewModel.md +++ /dev/null @@ -1,40 +0,0 @@ -**STRUCT** - -# `DocElementsViewModel` - -**Contents** - -- [Properties](#properties) - - `id` - - `docType` - - `isEnabled` - - `elements` - -```swift -public struct DocElementsViewModel: Identifiable -``` - -## Properties -### `id` - -```swift -public var id: String -``` - -### `docType` - -```swift -public let docType: String -``` - -### `isEnabled` - -```swift -public var isEnabled: Bool -``` - -### `elements` - -```swift -public var elements: [ElementViewModel] -``` diff --git a/Documentation/Reference/structs/ElementViewModel.md b/Documentation/Reference/structs/ElementViewModel.md deleted file mode 100644 index 59fe076..0000000 --- a/Documentation/Reference/structs/ElementViewModel.md +++ /dev/null @@ -1,54 +0,0 @@ -**STRUCT** - -# `ElementViewModel` - -**Contents** - -- [Properties](#properties) - - `id` - - `nameSpace` - - `elementIdentifier` - - `isEnabled` - - `isDisabled` - - `isSelected` - -```swift -public struct ElementViewModel: Identifiable -``` - -## Properties -### `id` - -```swift -public var id: String -``` - -### `nameSpace` - -```swift -public let nameSpace: String -``` - -### `elementIdentifier` - -```swift -public let elementIdentifier: String -``` - -### `isEnabled` - -```swift -public var isEnabled: Bool -``` - -### `isDisabled` - -```swift -public var isDisabled: Bool -``` - -### `isSelected` - -```swift -public var isSelected = true -``` diff --git a/Documentation/Reference/typealiases/RequestItems.md b/Documentation/Reference/typealiases/RequestItems.md deleted file mode 100644 index e55a51e..0000000 --- a/Documentation/Reference/typealiases/RequestItems.md +++ /dev/null @@ -1,7 +0,0 @@ -**TYPEALIAS** - -# `RequestItems` - -```swift -public typealias RequestItems = [String: [String: [String]]] -``` From fa8c4ad29e8408ac9189127e4e790a07dcec206c Mon Sep 17 00:00:00 2001 From: Filippos Sakellaropoulos Date: Thu, 4 Jul 2024 01:06:17 +0300 Subject: [PATCH 2/2] Update documentation reference URL --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b03dcb8..b2aa300 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,9 @@ The request dictionary in ``didReceiveRequest`` delegate method has the followin The BLE server will send the requested if the user accepts. In the case the client app must call the `handleAccept` callback with `true`. +### Documentation +Detail documentation reference is provided [here](https://eu-digital-identity-wallet.github.io/eudi-lib-ios-iso18013-data-transfer/documentation/mdocdatatransfer18013/) + ### Disclaimer The released software is a initial development release version: - The initial development release is an early endeavor reflecting the efforts of a short timeboxed period, and by no means can be considered as the final product.