Show
Ignore:
Timestamp:
04/19/2009 05:42:09 PM (3 years ago)
Author:
gbooker
Message:

Use a separate thread for rescanning a directory and send changes back to main thread. Tricky, but it works.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireMetaDataSupport.h

    r801 r820  
    2929 */ 
    3030@interface SapphireMetaDataSupport : NSObject { 
    31         NSTimer                 *writeTimer;            /*!< @brief The timer to agregate writes*/ 
    32         NSTimeInterval  interval;                       /*!< @brief The write interval*/ 
    33         BOOL                    locked;                         /*!< @brief Was the DB locked during the last save*/ 
     31        NSManagedObjectContext  *mainMoc;                       /*!< @brief The main context*/ 
     32        NSTimer                                 *writeTimer;            /*!< @brief The timer to agregate writes*/ 
     33        NSTimeInterval                  interval;                       /*!< @brief The write interval*/ 
     34        BOOL                                    locked;                         /*!< @brief Was the DB locked during the last save*/ 
    3435} 
    3536 
     
    5152 */ 
    5253+ (BOOL)save:(NSManagedObjectContext *)context; 
     54 
     55/*! 
     56 * @brief Save changes in a context in the main context 
     57 * 
     58 * @param context The context with changes to save 
     59 */ 
     60+ (void)applyChangesFromContext:(NSManagedObjectContext *)context; 
     61 
     62/*! 
     63 * @brief Sets the main context 
     64 * 
     65 * @param moc the main context 
     66 */ 
     67+ (void)setMainContext:(NSManagedObjectContext *)moc; 
    5368 
    5469/*!