harvester/common/inc/harvestercommon.h
changeset 0 c53acadfccc6
child 1 acef663c1218
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Harvester server commands*
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef __HARVESTERCOMMON_H__
       
    19 #define __HARVESTERCOMMON_H__
       
    20 
       
    21 #include <harvestereventenum.h>
       
    22 #include <e32msgqueue.h>
       
    23 #include <f32file.h>
       
    24 
       
    25 enum THarvesterService
       
    26 {
       
    27     EResumeHarvester,
       
    28     EPauseHarvester,
       
    29     EHarvestFile,
       
    30     ERegisterProcessOrigin,
       
    31     EUnregisterProcessOrigin,
       
    32 	ERegisterHarvestComplete,
       
    33     EUnregisterHarvestComplete,
       
    34     ERegisterHarvesterEvent,
       
    35     EUnregisterHarvesterEvent,
       
    36     EGetLastObserverId,
       
    37 
       
    38 #ifdef _DEBUG
       
    39     EStopHarvester,
       
    40 #endif
       
    41 
       
    42     EHarvestFileWithUID
       
    43 };
       
    44 
       
    45 /* Server version */
       
    46 const TUint KHarvesterServerMajorVersion = 0;
       
    47 const TUint KHarvesterServerMinorVersion = 1;
       
    48 const TUint KHarvesterServerBuildVersion = 1;
       
    49 
       
    50 /**
       
    51  * Harvester event status which is sent from 
       
    52  * harvester server to harvester client.
       
    53  */
       
    54 struct THarvesterEventNotification
       
    55 	{
       
    56 	TUint iObserverId;
       
    57 	HarvesterEventObserverType iObserverType;
       
    58 	HarvesterEventState iCurrentState;
       
    59 	TUint iItemsLeft;
       
    60 	};
       
    61 
       
    62 typedef RMsgQueue<THarvesterEventNotification> THarvesterEventQueue;
       
    63 
       
    64 /**
       
    65  * Common harvester event observer infomation.
       
    66  * 
       
    67  * Used for deliver client side information to server side during 
       
    68  * registering observers and store observer information in server side.
       
    69  */
       
    70 struct THarvesterEventObserverInfo
       
    71 	{
       
    72 	// client fills
       
    73 	TInt iQueueHandle;
       
    74 	TUint iObserverId;
       
    75 	TInt iObserverType;
       
    76 	TInt iNotificationInterval;
       
    77 
       
    78 	// server fills
       
    79 	TUint iProcessUid;
       
    80 	THarvesterEventQueue* iQueuePtr; // not owned
       
    81 	TUint iDelta;
       
    82 	};
       
    83 
       
    84 	
       
    85 _LIT(KHarvesterOomQueue, "mdsoommsgqueue");
       
    86 
       
    87 enum TMdsOomStatus
       
    88 	{
       
    89 	TMdsOomFreeRam,
       
    90 	TMdsOomMemoryGood
       
    91 	};
       
    92 
       
    93 const TInt KHarvesterGetDirFlags = ESortByDate | EDescending | EDirsFirst;
       
    94 
       
    95 const TInt KOriginIgnored = 255;
       
    96 const TInt KOriginFastHarvest = 254;
       
    97 
       
    98 const CActive::TPriority KHarvesterPriorityContextEngine = CActive::EPriorityUserInput;
       
    99 const CActive::TPriority KHarvesterPriorityMonitorPlugin = CActive::EPriorityUserInput;
       
   100 const CActive::TPriority KHarvesterPriorityComposerPlugin = CActive::EPriorityStandard;
       
   101 const CActive::TPriority KHarvesterPriorityHarvestingPlugin = CActive::EPriorityStandard;
       
   102 
       
   103 #endif
       
   104 
       
   105