sysstatemgmt/systemstatemgr/dompolicy/src/domainpolicy2.cpp
changeset 77 8a984d260a2d
parent 76 cb32bcc88bad
equal deleted inserted replaced
76:cb32bcc88bad 77:8a984d260a2d
   126 This should be present in the oridinal4 of the domainpolicy def file.
   126 This should be present in the oridinal4 of the domainpolicy def file.
   127 
   127 
   128 @param aPtr  Will have the state specification structure used in the array .
   128 @param aPtr  Will have the state specification structure used in the array .
   129 @param aNumElements Will hold the number of elements in the array.
   129 @param aNumElements Will hold the number of elements in the array.
   130 
   130 
   131 @return will return the version of the domain policy if the feature is enabled or else returns KErrNotSupported.
   131 @return will return the version of the domain policy if the feature is enabled or else returns KErrNone.
   132  */
   132 */
   133 #ifdef SYMBIAN_INCLUDE_APP_CENTRIC
   133 #ifdef SYMBIAN_INCLUDE_APP_CENTRIC
   134 EXPORT_C  TInt DmPolicy::GetStateSpec(TAny*& aPtr, TUint& aNumElements)
   134 EXPORT_C  TInt DmPolicy::GetStateSpec(TAny*& aPtr, TUint& aNumElements)
   135     {
   135     {    
   136     TInt version = KErrNotSupported;
       
   137     aPtr = (TAny*) StateSpecification;
   136     aPtr = (TAny*) StateSpecification;
   138     aNumElements = sizeof(StateSpecification)/sizeof(SDmStateSpecV1);    
   137     aNumElements = sizeof(StateSpecification)/sizeof(SDmStateSpecV1);    
   139     version = KSDmStateSpecV1;
   138     return KSDmStateSpecV1;    
   140     return version;    
       
   141     }
   139     }
   142 #else
   140 #else
   143 EXPORT_C  TInt DmPolicy::GetStateSpec(TAny*& aPtr, TUint& aNumElements)
   141 EXPORT_C  TInt DmPolicy::GetStateSpec(TAny*& aPtr, TUint& aNumElements)
   144     {
   142     {
   145     aPtr = NULL;
   143     aPtr = NULL;
   146     aNumElements = 0;
   144     aNumElements = 0;
   147     return KErrNotSupported;  
   145     return KErrNone;  
   148     }
   146     }
   149 #endif //SYMBIAN_INCLUDE_APP_CENTRIC
   147 #endif //SYMBIAN_INCLUDE_APP_CENTRIC
   150 
   148 
   151 /**
   149 /**
   152 Defines the function type for a static function that is implemented by
   150 Defines the function type for a static function that is implemented by