imagingandcamerafws/imagingfws/src/CompatAids.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CompatAids_h
       
    17 #define __CompatAids_h
       
    18 
       
    19 // The __PANIC_COMPAT macro is used to determine the action when client code calls an old mediasvr
       
    20 // function that is not supported under the new Multimedia components (MMF/ICL etc). The default
       
    21 // behaviour is to panic on debug mode but "return" KErrNotSupported for release. The macro can
       
    22 // be changed this default.
       
    23 
       
    24 #define __PANIC_COMPAT(result) __ASSERT_DEBUG((EFalse),(result))
       
    25 
       
    26 // __PANIC_COMPAT_IS_ACTIVE should be defined for what ever scenarios __PANIC_COMPAT might actually
       
    27 // call panic - eg. by default, for debug builds. This allows the Panic() calls of particular sub-modules
       
    28 // to be only defined if they are calls - thus avoiding warnings that would otherwise result.
       
    29 
       
    30 #if defined(_DEBUG)
       
    31 #define __PANIC_COMPAT_IS_ACTIVE
       
    32 #endif
       
    33 
       
    34 #endif // __CompatAids_h