 
         let downloadTasks: [NSURLSessionDownloadTask]
 
+        typealias FinishedAction = NSData -> Void
+        let finishedActions: [FinishedAction]
+
+        var progress: [NSProgress]
+
         typealias ReportAction = Double -> Void
         let reportProgressAction: ReportAction?
-
-        typealias FinishedAction = NSData -> Void
-        let finishedActions: [FinishedAction]
-
-        //let progress: NSProgress = NSProgress(totalUnitCount: -1)
-        var progress: [NSProgress]
     }
 
 


    class func downloadAttachmentsOfMessage(message: Message, reportProgress: ProgressReporter.ReportAction?, imageFinished: (UIImage -> Void)?) {

        let messageID = message.messageID
        let mediaType = message.mediaType

        let attachmentURLString = message.attachmentURLString
        let downloadState = message.downloadState

        if downloadState == MessageDownloadState.Downloaded.rawValue {
            //reportProgress?(1.0)

            return
        }
        
        if !attachmentURLString.isEmpty, let URL = NSURL(string: attachmentURLString) {


            handleData(data, ofDownloadTask: downloadTask)
        }

        println("didFinishDownloadingToURL \(downloadTask.originalRequest.URL)")
    }

