commonservices/activitymanager/src/dummy.cpp
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-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 // INCLUDE FILES
       
    17 #include <e32def.h>
       
    18 #include "activitymanagerdebug.h"
       
    19 
       
    20 #ifdef _DEBUG
       
    21     #define UNSUPPORTED_CALL_TRACE(_dummyMethodOrdinal) TraceCaller(_dummyMethodOrdinal)
       
    22 #else // _DEBUG
       
    23     #define UNSUPPORTED_CALL_TRACE(_dummyMethodOrdinal)
       
    24 #endif // _DEBUG
       
    25 
       
    26 // ================= LOCAL FUNCTIONS =======================
       
    27 
       
    28 #ifdef _DEBUG
       
    29 /**
       
    30 Print out which method dummy method was called.
       
    31 @internalComponent
       
    32 @param aDummyMethodOrdinal Integer identifying the dummy method called
       
    33 */
       
    34 static void TraceCaller(TInt aDummyMethodOrdinal)
       
    35     {
       
    36     aDummyMethodOrdinal = aDummyMethodOrdinal; // To avoid compiler warning;
       
    37     
       
    38     TName caller = RThread().Name();
       
    39     HBufC* hbuf = HBufC::New( 256 );
       
    40     if ( hbuf )
       
    41         {
       
    42         TPtr buf = hbuf->Des();
       
    43 
       
    44         buf.Copy( _L( "ActivityManager: '" ) );
       
    45         buf.Append( caller );
       
    46         buf.Append( _L( "' called Dummy::Dummy" ) );
       
    47 
       
    48         __ACTIVITYMANAGER_TRACE2("%S%d",&buf,aDummyMethodOrdinal);
       
    49               
       
    50         delete hbuf;
       
    51         }
       
    52     }
       
    53 
       
    54 #endif // _DEBUG
       
    55 
       
    56 // CLASS DECLARATION
       
    57 
       
    58 /**
       
    59 Dummy class. Contains placeholder for a removed function to prevent BC break.
       
    60 @publishedAll
       
    61 @deprecated
       
    62 */
       
    63 class Dummy
       
    64     {
       
    65 
       
    66     public: // New functions
       
    67 
       
    68         IMPORT_C static void Dummy1();
       
    69         IMPORT_C static void Dummy2();
       
    70 #if defined __EABI__ || defined __X86GCC__
       
    71         IMPORT_C static void Dummy3();
       
    72 #endif
       
    73     };
       
    74 
       
    75 // ================= MEMBER FUNCTIONS =======================
       
    76 
       
    77 
       
    78 /**
       
    79 Dummy method
       
    80 @publishedAll
       
    81 @deprecated
       
    82 */
       
    83 EXPORT_C void Dummy::Dummy1() { UNSUPPORTED_CALL_TRACE(1); };
       
    84 /**
       
    85 Dummy method
       
    86 @publishedAll
       
    87 @deprecated
       
    88 */
       
    89 EXPORT_C void Dummy::Dummy2() { UNSUPPORTED_CALL_TRACE(2); };
       
    90 
       
    91 #if defined __EABI__ || defined __X86GCC__
       
    92 /**
       
    93 Dummy method
       
    94 @publishedAll
       
    95 @deprecated
       
    96 */
       
    97 EXPORT_C void Dummy::Dummy3() { UNSUPPORTED_CALL_TRACE(3); };
       
    98 #endif