 
     public func boolForKey(defaultName: String) -> Bool? {
         return things[defaultName] as? Bool
+    }
+
+    public func longForKey(defaultName: String) -> Int64? {
+        let num = things[defaultName] as? NSNumber
+        if let num = num {
+            return num.longLongValue
+        }
+        return nil
     }
 
     public func stringArrayForKey(defaultName: String) -> [String]? {

        // distinguish between false and non-existent keys, so use objectForKey
        // and cast the result instead.
        return userDefaults.objectForKey(qualifyKey(defaultName)) as? Bool
    }

    public func stringArrayForKey(defaultName: String) -> [String]? {

import Foundation

public protocol ProfilePrefs {
    func setLong(value: Int64, forKey defaultName: String)
    func setObject(value: AnyObject?, forKey defaultName: String)
    func stringForKey(defaultName: String) -> String?
    func boolForKey(defaultName: String) -> Bool?
    func longForKey(defaultName: String) -> Int64?
    func stringArrayForKey(defaultName: String) -> [String]?
    func arrayForKey(defaultName: String) -> [AnyObject]?
    func dictionaryForKey(defaultName: String) -> [String : AnyObject]?
