harvesterplugins/media/mediautils/inc/mdeobjectqueuemanager.h
changeset 26 367228f82b66
parent 0 ccd0fd43f247
child 27 7a8855317cbd
equal deleted inserted replaced
24:1abfa342db42 26:367228f82b66
    50     void AddMdeItemToQueueL( TItemId aObjId, TCPixActionType aActionType);
    50     void AddMdeItemToQueueL( TItemId aObjId, TCPixActionType aActionType);
    51     //From CActive
    51     //From CActive
    52     void RunL();
    52     void RunL();
    53     void DoCancel();
    53     void DoCancel();
    54     TInt RunError();
    54     TInt RunError();
       
    55     void PauseL();
       
    56     void ResumeL();
    55 private:
    57 private:
    56     /*
    58     /*
    57      * OverWriteOrAddToQueueL add or update item to queue
    59      * OverWriteOrAddToQueueL add or update item to queue
    58      * @param TItemId aObjId itemd id
    60      * @param TItemId aObjId itemd id
    59      * @param TCPixActionType aActionType action cpix
    61      * @param TCPixActionType aActionType action cpix
    63      * First phase Constructor
    65      * First phase Constructor
    64      * @parm MMediaObjectHandler* media object handler callback
    66      * @parm MMediaObjectHandler* media object handler callback
    65      */
    67      */
    66     CMdeObjectQueueManager(MMediaObjectHandler* );
    68     CMdeObjectQueueManager(MMediaObjectHandler* );
    67     /*
    69     /*
       
    70      * Activate the timer object to index queued media items
       
    71      */
       
    72     void ActivateAO();
       
    73     /*
    68      * Second phase constructor
    74      * Second phase constructor
    69      */
    75      */
    70     void ConstructL();
    76     void ConstructL();
    71 private:
    77 private:
    72     enum TState 
    78     enum TState 
    73     { 
    79     { 
    74         EStateNone = 0, 
    80         EStateNone = 0, 
    75         EStateWaiting 
    81         EStateWaiting 
       
    82     };
       
    83     enum THarvestingState 
       
    84     { 
       
    85         EStateResume = 0, 
       
    86         EStatePause 
    76     };
    87     };
    77     struct TMdeActionRecord 
    88     struct TMdeActionRecord 
    78     {
    89     {
    79     TItemId iObjectId;
    90     TItemId iObjectId;
    80     TCPixActionType iAction;
    91     TCPixActionType iAction;
    87 private:
    98 private:
    88     // Queue of documents to be indexed
    99     // Queue of documents to be indexed
    89     RArray<TMdeActionRecord> iJobQueue; 
   100     RArray<TMdeActionRecord> iJobQueue; 
    90     // State machine's state
   101     // State machine's state
    91     TState iState;
   102     TState iState;
       
   103     THarvestingState iHState;
    92     // Timer which is used to delay indexing messages
   104     // Timer which is used to delay indexing messages
    93     RTimer iTimer; //Timer for self activation of AO
   105     RTimer iTimer; //Timer for self activation of AO
    94     MMediaObjectHandler* iMdeObjectHandler; //media object handler
   106     MMediaObjectHandler* iMdeObjectHandler; //media object handler
    95     };
   107     };
    96 
   108