-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import Foundation | ||
|
||
public struct DcVcardContact: Decodable { | ||
/// Email address. | ||
public let addr: String | ||
|
||
/// The contact's name, or the email address if no name was given. | ||
public let displayName: String | ||
|
||
/// Public PGP key in Base64. | ||
public let key: String? | ||
|
||
/// Profile image in Base64. | ||
public let profileImage: String? | ||
|
||
/// Contact color as hex string. | ||
public let contactColor: String | ||
|
||
// Last update timestamp. | ||
public let timestamp: Int64 | ||
|
||
public init(addr: String, displayName: String, key: String? = nil, profileImage: String? = nil, contactColor: String, timestamp: Int64) { | ||
self.addr = addr | ||
self.displayName = displayName | ||
self.key = key | ||
self.profileImage = profileImage | ||
self.contactColor = contactColor | ||
self.timestamp = timestamp | ||
} | ||
} | ||
|
||
struct DcVcardContactResult: Decodable { | ||
let result: DcVcardContact | ||
} |