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