-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnums.swift
51 lines (45 loc) · 1.15 KB
/
Enums.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// Enums.swift
// Rynly
//
// Created by N A Shashank on 12/19/17.
// Copyright © 2017 N A Shashank. All rights reserved.
//
import Foundation
import CoreLocation
enum ServiceLocatorType {
case mock
case remote
}
enum EntryViewType {
case login
case register
}
enum Typealias {
typealias defaultCallBack = () -> Void
typealias boolCallBack = (Bool) -> Void
typealias locationCallBack = (CLLocationCoordinate2D) -> Void
typealias MapCallBack = (MapError?) -> Void
}
enum MapError:Error{
case mapCreationFailure
case dataSourceMissing
case pathDrawFailed
case pathFetchFailed
func description() -> String
{
var strToReturn = String()
switch self
{
case MapError.mapCreationFailure:
strToReturn = "Failed to create a map"
case MapError.dataSourceMissing:
strToReturn = "Latitide and Longitude not specified"
case MapError.pathDrawFailed:
strToReturn = "Failed to draw route"
case MapError.pathFetchFailed:
strToReturn = "Failed to fetch route information"
}
return strToReturn
}
}