engine/collectionframework/thumbnailcreator/inc/mglxtnvolumedatabaseobserver.h
changeset 71 27f2d7aec52a
parent 69 45459746d5e8
child 72 0a8e959402e5
equal deleted inserted replaced
69:45459746d5e8 71:27f2d7aec52a
     1 /*
       
     2 * Copyright (c) 2008-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:   Definition of CGlxtnVolumeDatabase
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  * @internal reviewed 30/07/2007 by Simon Brooks
       
    22  */
       
    23 
       
    24 #ifndef M_GLXTNVOLUMEDATABASEOBSERVER_H
       
    25 #define M_GLXTNVOLUMEDATABASEOBSERVER_H
       
    26 
       
    27 #include "glxtnstd.h"   // For TGlxImageDataFormat
       
    28 
       
    29 /**
       
    30  * Typesafe thumbnail ID.
       
    31  */
       
    32 class TGlxtnThumbnailIdTypeBase {};     // Don't use this
       
    33 typedef TGlxId<TGlxtnThumbnailIdTypeBase> TGlxtnThumbnailId;    // Use this
       
    34 
       
    35 /**
       
    36  * Interface to receive callbacks from a CGlxtnVolumeDatabase.
       
    37  *
       
    38  * @author Dan Rhodes
       
    39  * @ingroup glx_thumbnail_creator
       
    40  */
       
    41 class MGlxtnVolumeDatabaseObserver
       
    42     {
       
    43 public:
       
    44     /**
       
    45     * Called when a database operation cannot be completed.
       
    46     * @param aError Error code.
       
    47     */
       
    48     virtual void HandleDatabaseError(TInt aError) = 0;
       
    49     /**
       
    50     * Called when a thumbnail ID has been found in the Ids table.
       
    51     * @param aThumbId Thumbnail ID for the media item.
       
    52     */
       
    53     virtual void HandleThumbnailIdFromMediaIdL(
       
    54                                     const TGlxtnThumbnailId& aThumbId ) = 0;
       
    55     /**
       
    56     * Called when a thumbnail ID has been found in the Items table.
       
    57     * @param aThumbId Thumbnail ID for the media item.
       
    58     */
       
    59     virtual void HandleThumbnailIdFromFilenameL(
       
    60                                     const TGlxtnThumbnailId& aThumbId ) = 0;
       
    61     /**
       
    62     * Called when a thumbnail ID has been saved in the Ids table.
       
    63     */
       
    64     virtual void HandleThumbnailIdStoredL() = 0;
       
    65     /**
       
    66     * Called when a thumbnail has been found in the Thumbnails table.
       
    67     * @param aFormat Thumbnail data format.
       
    68     * @param aData Thumbnail binary data (ownership passed).
       
    69     */
       
    70     virtual void HandleThumbnail(TGlxImageDataFormat aFormat, HBufC8* aData) = 0;
       
    71     /**
       
    72     * Called when a thumbnail has been saved in the Thumbnails table.
       
    73     */
       
    74     virtual void HandleThumbnailStored() = 0;
       
    75     /**
       
    76     * Called when a record has been deleted from a Ids table.
       
    77     */
       
    78     virtual void HandleMediaIdDeletedL() = 0;
       
    79     /**
       
    80     * Called when records have been deleted from a Thumbnails table.
       
    81     */
       
    82     virtual void HandleThumbnailsDeletedL() = 0;
       
    83     /**
       
    84     * Called when a record has been deleted from a Items table.
       
    85     */
       
    86     virtual void HandleItemDeletedL() = 0;
       
    87     /**
       
    88     * Called when availability has been chaecked.
       
    89     * @param aResult The result of the check.
       
    90     */
       
    91     virtual void HandleAvailabilityChecked(TInt aResult) = 0;
       
    92     /**
       
    93     * Called after the database has been cleaned up.
       
    94     */
       
    95     virtual void HandleDatabaseCleanedL() = 0;
       
    96     };
       
    97 
       
    98 #endif  // M_GLXTNVOLUMEDATABASEOBSERVER_H