imagehandlingutilities/thumbnailmanager/thumbnailclient/src/thumbnaildataimpl.cpp
branchRCL_3
changeset 22 9d4d3445ce6e
parent 21 6257223ede8a
equal deleted inserted replaced
21:6257223ede8a 22:9d4d3445ce6e
    17 
    17 
    18 
    18 
    19 #include <fbs.h>
    19 #include <fbs.h>
    20 
    20 
    21 #include "thumbnaildataimpl.h"
    21 #include "thumbnaildataimpl.h"
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "thumbnaildataimplTraces.h"
       
    25 #endif
       
    26 
    22 
    27 // ======== MEMBER FUNCTIONS ========
    23 // ======== MEMBER FUNCTIONS ========
    28 
    24 
    29 // ---------------------------------------------------------------------------
    25 // ---------------------------------------------------------------------------
    30 // CThumbnailDataImpl::CThumbnailDataImpl()
    26 // CThumbnailDataImpl::CThumbnailDataImpl()
    31 // C++ default constructor can NOT contain any code, that might leave.
    27 // C++ default constructor can NOT contain any code, that might leave.
    32 // ---------------------------------------------------------------------------
    28 // ---------------------------------------------------------------------------
    33 //
    29 //
    34 CThumbnailDataImpl::CThumbnailDataImpl()
    30 CThumbnailDataImpl::CThumbnailDataImpl()
    35     {
    31     {
    36     OstTrace0( TRACE_NORMAL, CTHUMBNAILDATAIMPL_CTHUMBNAILDATAIMPL, "CThumbnailDataImpl::CThumbnailDataImpl" );
       
    37     // No implementation required
    32     // No implementation required
    38     }
    33     }
    39 
    34 
    40 
    35 
    41 // ---------------------------------------------------------------------------
    36 // ---------------------------------------------------------------------------
    43 // Destructor.
    38 // Destructor.
    44 // ---------------------------------------------------------------------------
    39 // ---------------------------------------------------------------------------
    45 //
    40 //
    46 CThumbnailDataImpl::~CThumbnailDataImpl()
    41 CThumbnailDataImpl::~CThumbnailDataImpl()
    47     {
    42     {
    48     OstTrace0( TRACE_NORMAL, DUP1_CTHUMBNAILDATAIMPL_CTHUMBNAILDATAIMPL, "CThumbnailDataImpl::~CThumbnailDataImpl" );
       
    49     delete iBitmap;
    43     delete iBitmap;
    50     iBitmap = NULL;
    44     iBitmap = NULL;
    51     iClientData = NULL;
    45     iClientData = NULL;
    52     }
    46     }
    53 
    47 
    57 // Get a pointer to a CFbsBitmap containing the thumbnail image.
    51 // Get a pointer to a CFbsBitmap containing the thumbnail image.
    58 // ---------------------------------------------------------------------------
    52 // ---------------------------------------------------------------------------
    59 //
    53 //
    60 CFbsBitmap* CThumbnailDataImpl::Bitmap()
    54 CFbsBitmap* CThumbnailDataImpl::Bitmap()
    61     {
    55     {
    62     OstTrace0( TRACE_NORMAL, CTHUMBNAILDATAIMPL_BITMAP, "CThumbnailDataImpl::Bitmap" );
       
    63     return iBitmap;
    56     return iBitmap;
    64     }
    57     }
    65 
    58 
    66 
    59 
    67 // ---------------------------------------------------------------------------
    60 // ---------------------------------------------------------------------------
    69 // Get a pointer to a CFbsBitmap containing the thumbnail image.
    62 // Get a pointer to a CFbsBitmap containing the thumbnail image.
    70 // ---------------------------------------------------------------------------
    63 // ---------------------------------------------------------------------------
    71 //
    64 //
    72 CFbsBitmap* CThumbnailDataImpl::DetachBitmap()
    65 CFbsBitmap* CThumbnailDataImpl::DetachBitmap()
    73     {
    66     {
    74     OstTrace0( TRACE_NORMAL, CTHUMBNAILDATAIMPL_DETACHBITMAP, "CThumbnailDataImpl::DetachBitmap" );
       
    75     CFbsBitmap* ret = iBitmap;
    67     CFbsBitmap* ret = iBitmap;
    76     iBitmap = NULL; // client owns it now
    68     iBitmap = NULL; // client owns it now
    77     return ret;
    69     return ret;
    78     }
    70     }
    79 
    71 
    83 // Get client data structure.
    75 // Get client data structure.
    84 // ---------------------------------------------------------------------------
    76 // ---------------------------------------------------------------------------
    85 //
    77 //
    86 TAny* CThumbnailDataImpl::ClientData()
    78 TAny* CThumbnailDataImpl::ClientData()
    87     {
    79     {
    88     OstTrace0( TRACE_NORMAL, CTHUMBNAILDATAIMPL_CLIENTDATA, "CThumbnailDataImpl::ClientData" );
       
    89     return iClientData;
    80     return iClientData;
    90     }
    81     }
    91 
    82 
    92 
    83 
    93 // ---------------------------------------------------------------------------
    84 // ---------------------------------------------------------------------------
    95 // Sets the thumbnail object.
    86 // Sets the thumbnail object.
    96 // ---------------------------------------------------------------------------
    87 // ---------------------------------------------------------------------------
    97 //
    88 //
    98 void CThumbnailDataImpl::Set( CFbsBitmap* aBitmap, TAny* aClientData )
    89 void CThumbnailDataImpl::Set( CFbsBitmap* aBitmap, TAny* aClientData )
    99     {
    90     {
   100     OstTrace0( TRACE_NORMAL, CTHUMBNAILDATAIMPL_SET, "CThumbnailDataImpl::Set" );
       
   101     delete iBitmap;
    91     delete iBitmap;
   102     iBitmap = aBitmap;
    92     iBitmap = aBitmap;
   103     iClientData = aClientData;
    93     iClientData = aClientData;
   104     }
    94     }
   105 
    95