Home > Products > SophiaFramework UNIVERSE > Tutorial > Scheduler > - 5 / 7 -

BREW Scheduler Supporting vCalendar - 5 / 7 -

Overview

SyncScheduler Application Class

The SyncScheduler application class is the TemplateApp class with a VCalCollection object.

SFMTYPEDEFCLASS(SyncScheduler)
class SyncScheduler : public SFRApplication {
    SFMSEALCOPY(SyncScheduler)
private:
    VCalCollection _vcalCollection; // VCalCollection Object
public:
    static SFCInvokerPtr Factory(Void);
    
    /* The following are functions copied from the TemplateApp class */
    /* they consist mainly of code for processing dialogs and menus  */
   
    static SFXRectangle CalculateWindowPosition(Void);
    static SFXRectangle CalculateDialogPosition
    (SFXMarginConstRef margin, SInt16 height);
    
    static SFXRectangle CalculateMenuPosition(SInt16 limit);
    
    static SFCError OpenStandardDialog(SFRDialogPtr dialog,
    SFRHandlerSPP procedure, VoidPtr reference);
    
    static Void CloseStandardDialog(SFRDialogPtr dialog);
    
    static SFCError OpenCustomDialog(SFRDialogPtr dialog,
    SFRHandlerSPP procedure, VoidPtr reference);
    
    static Void CloseCustomDialog(SFRDialogPtr dialog)
    ;
    static SFCError OpenStandardMenu(SFRMenuPtr menu,
    SFRHandlerSPP procedure, VoidPtr reference);
    
    static Void CloseStandardMenu(SFRMenuPtr menu);
    
    /* ------------------------------------------------------------- */
    
    // get instance of VCalCollection
    static VCalCollectionPtr GetVCalCollection(Void);
private:
    explicit SyncScheduler(Void) static_throws;
    virtual ~SyncScheduler(Void);
    HANDLER_DECLARE_VOIDSTART(OnAppStart)
    HANDLER_DECLARE_VOIDSTOP(OnAppStop)
    HANDLER_DECLARE_VOIDRESUME(OnAppResume)
    HANDLER_DECLARE_VOIDSUSPEND(OnAppSuspend)
    
    // handler for softkey to be copied from TempleteApp class
    static Bool OnSoftkeySHP(SFXEventConstRef event, 
                             VoidPtr reference);
};

Go back  1   2   3   4   5   6   Apdx   Next page