terminalsecurity/SCP/DmEventNotifier/inc/DmEventNotifierInternal.h
changeset 0 b497e44ab2fc
child 5 3f7d9dbe57c8
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 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: This header contains all the common constants that are used by the application.
       
    15 *
       
    16 */
       
    17 #ifndef __DMEVENTNOTIFIERINTERNAL_H__
       
    18 #define __DMEVENTNOTIFIERINTERNAL_H__
       
    19 
       
    20 
       
    21 //System Includes
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    25 #include <schinfo.h>
       
    26 #else
       
    27 #include <schinfo.h>
       
    28 #include <schinfointernal.h>
       
    29 #endif
       
    30 
       
    31 //User includes
       
    32 #include "DmEventNotifierCRKeys.h"
       
    33 
       
    34 //Defines
       
    35 #define __LEAVE_IF_ERROR(x) if(KErrNone!=x) {FLOG(_L("LEAVE in %s: %d"), __FILE__, __LINE__); User::Leave(x); }
       
    36 
       
    37 //Size of the schedule condition array
       
    38 #define KConditionArraySize 1
       
    39 
       
    40 //Max size of the schedule condition array
       
    41 #define KConditionArraySizeMax 5
       
    42 
       
    43 //Max size of the schedule reference
       
    44 #define KScheduleReferenceMax 5
       
    45 
       
    46 //Max size of the task array
       
    47 #define KTaskArraySizeMax 5
       
    48 
       
    49 //Max number of services present
       
    50 #define KMaxServices 3
       
    51 
       
    52 //Name of the executable
       
    53 _LIT(KDmEventNotifierExe, "dmeventnotifier.exe");
       
    54 
       
    55 //A Type to hold the conditions
       
    56 typedef CArrayFixFlat<TTaskSchedulerCondition>  CSchConditionArray;
       
    57 
       
    58 //Structure to hold one publish subscribe key values
       
    59 struct TPSKey 
       
    60     {
       
    61     //Member variables
       
    62     const TUid    iConditionCategory;   //Holds the publish subscribe category
       
    63     const TUint   iConditionKey;        //Holds the publish subscribe key
       
    64 
       
    65     //Member functions
       
    66     TPSKey() : iConditionCategory(KNullUid), iConditionKey(KErrNone) {}
       
    67 
       
    68     TPSKey(TUid aConditionCategory, TUint aConditionKey): iConditionCategory(aConditionCategory),iConditionKey(aConditionKey){};
       
    69 
       
    70     TBool operator == (TPSKey aKey)
       
    71         {
       
    72         return (iConditionCategory == aKey.iConditionCategory && iConditionKey == aKey.iConditionKey);
       
    73         }
       
    74     };
       
    75 
       
    76 //Structure to hold one publish subscribe key along with the expiry condition 
       
    77 struct TPSKeyCondition
       
    78     {
       
    79     //Member variables
       
    80     const TPSKey  iPskey;       //Holds the publish subscribe key
       
    81     const TInt    iSchState;    //The value to be checked against
       
    82     const TTaskSchedulerCondition::TConditionType iSchType; //The condition on the value
       
    83 
       
    84     //Member Functions
       
    85     TPSKeyCondition() : iSchState(KErrNone), iSchType(TTaskSchedulerCondition::EEquals) {};
       
    86 
       
    87     TPSKeyCondition( TUid aConditionCategory, TUint aConditionKey, TInt aState, TTaskSchedulerCondition::TConditionType aSchType) : iPskey(aConditionCategory,aConditionKey), iSchState(aState), iSchType(aSchType){};
       
    88 
       
    89     TPSKeyCondition(const TPSKeyCondition& aPsKeyCondition) : iPskey(aPsKeyCondition.iPskey), iSchState(aPsKeyCondition.iSchState),iSchType(aPsKeyCondition.iSchType) {};
       
    90 
       
    91     };
       
    92 
       
    93 #endif // __DMEVENTNOTIFIERINTERNAL_H__