 import MapKit
 import EventKit
 
-//protocol PermissionExplanationProtocol {
-//    func explanationDidFinishWithPermissionGranted(permissionGranted : Bool)
-//    func showPermissionFailedAlert()
-//    
-//}
-
-enum PermissionInterestedIn {
+
+public enum PermissionInterestedIn {
     case Location, Calendar, Notification
 }
-class PermissionController: NSObject, CLLocationManagerDelegate {
-//    var delegate : PermissionExplanationProtocol?
+public class PermissionController: NSObject, CLLocationManagerDelegate {
     private var locationManager : CLLocationManager?
     private var eventStore : EKEventStore?
     private var currentViewControllerView: UIView?

    
    private var successBlock : (()->())?
    private var failureBlock: (()->())?
    /**
    Checks if the user agreed to let the app use the location.
    Requests the permission if it is not already granted.
    - returns: true if user agreed false if not
    
    */

/**
Use this method to present the permission view.
The user will be asked to give the permission by a dialog.

When the user already granted his permission, the button is not enabled (early version, later: checkmark indication).

- returns: Bool that is true, when requested permission is already granted.
If other permissions are missing, the PermissionView will be displayed.
    
- parameter viewController: The UIViewController on which the PermissionView shall be presented.
    

    
    
    //MARK: - CLLocationManagerDelegate
    public func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
        
        NSNotificationCenter.defaultCenter().postNotificationName("LocalizationAuthorizationStatusChanged", object: manager)
        NSNotificationCenter.defaultCenter().postNotificationName("AuthorizationStatusChanged", object: nil)
