         sop.enqueue()
 
     }
-    
-    
     func search(ewktMapContent: String,leuchtenEnabled: Bool, mastenEnabled: Bool,mauerlaschenEnabled: Bool, leitungenEnabled: Bool, schaltstellenEnabled: Bool, handler: () -> ()) {
         assert(loggedIn)
         var qp=QueryParameters(list:[

            NSUserDefaults.standardUserDefaults().setObject(clientCertContainerPass, forKey: "clientCertContainerPass")
        }
    }
    

    // MARK: SHARED INSTANCE
    static var instance: CidsConnector!

    class func sharedInstance() -> CidsConnector {
        self.instance = (self.instance ?? CidsConnector())
        return self.instance
    }
    
    private var login : String!
    private var password : String!
    private let domain = "BELIS2"
    let queue = NSOperationQueue()
    var searchResults=[Entity: [GeoBaseEntity]]()
    
    var allArbeitsauftraegeBeforeCurrentSelection=[Entity: [GeoBaseEntity]]()
    
    var selectedArbeitsauftrag: Arbeitsauftrag?
    
    var veranlassungsCache=[String:Veranlassung]()
    
    let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
    
    var mainVC:MainViewController?
    
    init(){
        
        let storedTLSEnabled: AnyObject? = NSUserDefaults.standardUserDefaults().objectForKey("tlsEnabled")


public class CidsConnector {
    
    // MARK: - fill simulator value
    #if arch(i386) || arch(x86_64)
    let simulator=true
    #else
    let simulator=false
    #endif
    
    
    // MARK: SHARED INSTANCE
    static var instance: CidsConnector!
    class func sharedInstance() -> CidsConnector {
        self.instance = (self.instance ?? CidsConnector())
        return self.instance
    }

    
    
    // MARK: - Values with custom getters and setters
    var tlsEnabled=false {
        didSet {
            NSUserDefaults.standardUserDefaults().setObject(tlsEnabled, forKey: "tlsEnabled")
