Skip to content
Snippets Groups Projects
Commit feed49a3 authored by jakobsbode's avatar jakobsbode
Browse files

change function declaration

parent a3958357
Branches
No related tags found
No related merge requests found
......@@ -41,16 +41,18 @@ class OnboardingDataHandler {
func setSettings(with mailaddress: String, password: String, username: String, imapServer: String, imapPort: Int, imapConnectionType: String, imapAuthenticationType: String, smtpServer: String, smtpPort: Int, smtpConnectionType: String, smtpAuthenticationType: String) {
func setSettings(with mailaddress: String, password: String, username: String, imapServer: String, imapPort: Int, imapConnectionType: Int, imapAuthenticationType: Int, smtpServer: String, smtpPort: Int, smtpConnectionType: Int, smtpAuthenticationType: Int) {
if let mailconfig = mailconfig {
//TODO: Update mailconfig
print("update Mail cpnfig!")
}
else {
let imapAuth = MCOAuthType.init(rawValue: keyForValue(authenticationOptions, value: imapAuthenticationType)[0])
let imapCon = MCOConnectionType.init(rawValue: keyForValue(transportOptions, value: imapConnectionType)[0])
let smtpAuth = MCOAuthType.init(rawValue: keyForValue(authenticationOptions, value: smtpAuthenticationType)[0])
let smtpCon = MCOConnectionType.init(rawValue: keyForValue(transportOptions, value: smtpConnectionType)[0])
let imapAuth = MCOAuthType.init(rawValue: imapAuthenticationType % authenticationOptions.count)
let imapCon = MCOConnectionType.init(rawValue: imapConnectionType % transportOptions.count)
let smtpAuth = MCOAuthType.init(rawValue: smtpAuthenticationType % authenticationOptions.count)
let smtpCon = MCOConnectionType.init(rawValue: smtpConnectionType % transportOptions.count)
mailconfig = MailConfigurator(userAddr: mailaddress, password: password, accountName: nil, displayName: nil, imapHostname: imapServer, imapPort: UInt32(imapPort), imapAuthType: imapAuth , imapConType: imapCon, smtpHostname: smtpServer, smtpPort: UInt32(smtpPort), smtpAuthType: smtpAuth, smtpConType: smtpCon)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment