upnpframework/upnpthumbnail/inc/upnpthumbnailcreator.h
author Sampo Huttunen <sampo.huttunen@nokia.com>
Wed, 03 Nov 2010 11:45:09 +0200
branchIOP_Improvements
changeset 40 08b5eae9f9ff
permissions -rw-r--r--
merge from Nokia's internal development branch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     1
/*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     8
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    11
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    12
* Contributors:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    13
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    14
* Description:      
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    15
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    16
*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    17
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    18
// This file defines the API for ThumbnailCreator.dll
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    19
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    20
#ifndef __UPNPTHUMBNAILCREATOR_H__
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    21
#define __UPNPTHUMBNAILCREATOR_H__
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    22
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    23
//  Include Files
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    24
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    25
#include <e32base.h>	// CBase
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    26
#include <e32std.h>	 // TBuf
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    27
#include <mdesession.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    28
#include <mdeconstants.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    29
#include <mdenamespacedef.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    30
#include <mdequery.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    31
#include <mdeobject.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    32
#include <thumbnailmanager.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    33
#include <thumbnailmanagerobserver.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    34
#include "upnpthumbnailcreatorobserver.h"
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    35
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    36
class CMdeSession;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    37
class CMdEObjectQuery;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    38
class CFbsBitmap;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    39
class CImageEncoder;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    40
//  Constants
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    41
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    42
enum TThumbnailDlnaSize
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    43
    {
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    44
    ESmall = 0,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    45
    EMedium,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    46
    ELarge,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    47
    EThumbnail,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    48
    ESmallIcon,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    49
    ELargeIcon
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    50
    };
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    51
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    52
//  Class Definitions
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    53
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    54
NONSHARABLE_CLASS( CUpnpThumbnailCreator) : private CActive,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    55
                                          private MMdESessionObserver,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    56
                                          private MMdEQueryObserver,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    57
                                          private MThumbnailManagerObserver
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    58
    {
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    59
public:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    60
    // states for this engine
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    61
    enum TThumbnailCreatorStates 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    62
        {
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    63
        EIdle = 0,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    64
        EInitializeMde,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    65
        EQueryingImage,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    66
        EFetchingThumbnail,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    67
        EConvertingThumbnail
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    68
        };
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    69
        // new functions
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    70
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    71
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    72
     * static NewL
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    73
     *
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    74
     * @param MUpnpThumbnailCreatorObserver, thumbnail creator observer
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    75
     * @param aFilePath, file path of the source file
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    76
     * @return instance to CUpnpThumbnailCreator
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    77
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    78
    IMPORT_C static CUpnpThumbnailCreator* NewL(
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    79
                    MUpnpThumbnailCreatorObserver& aMThumbnailCreatorObserver,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    80
                    const TDesC& aFilePath,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    81
                    TThumbnailDlnaSize aSize);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    82
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    83
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    84
     * static NewLC
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    85
     *
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    86
     * @param MUpnpThumbnailCreatorObserver, thumbnail creator observer
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    87
     * @param aFilePath, file path of the source file 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    88
     * @return instance to CUpnpThumbnailCreator
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    89
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    90
    IMPORT_C static CUpnpThumbnailCreator* NewLC(
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    91
                    MUpnpThumbnailCreatorObserver& aMThumbnailCreatorObserver,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    92
                    const TDesC& aFilePath,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    93
                    TThumbnailDlnaSize aSize);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    94
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    95
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    96
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    97
     * On completion of the ThumbnailCreatorReady callback with status KErrNone, 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    98
     * this method MdeObjectId returns the MdE object Id for the image.
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    99
     * @return ObjectId for the object in MdE 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   100
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   101
    IMPORT_C TInt MdeObjectId() const;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   102
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   103
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   104
     * On completion of the ThumbnailCreatorReady callback with status KErrNone, 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   105
     * this method ThumbnailFilePath returns the thumbnail file path.
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   106
     * @return filepath of the thumbnail 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   107
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   108
    IMPORT_C const TDesC& ThumbnailFilePath() const;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   109
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   110
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   111
     * On completion of the ThumbnailCreatorReady callback with status KErrNone, 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   112
     * this method Thumbnail returns the thumbnail
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   113
     * @return reference to thumbnail created 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   114
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   115
    IMPORT_C CFbsBitmap& Thumbnail() const;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   116
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   117
public:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   118
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   119
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   120
     *  Destructor
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   121
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   122
     ~CUpnpThumbnailCreator();
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   123
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   124
private:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   125
    /********************************************************************
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   126
     * MMdESessionObserver  virtual methods
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   127
     ********************************************************************/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   128
    void HandleSessionOpened(CMdESession& aSession, TInt aError);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   129
    void HandleSessionError(CMdESession& aSession, TInt aError);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   130
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   131
    /********************************************************************
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   132
     * MMdEQueryObserver virtual methods
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   133
     ********************************************************************/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   134
    void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   135
                                           TInt aNewItemCount);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   136
    void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   137
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   138
    /********************************************************************
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   139
     * MThumbnailManagerObserver virtual methods
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   140
     ********************************************************************/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   141
    // Callbacks from MThumbnailManagerObserver for getting thumbnails
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   142
    void ThumbnailPreviewReady(MThumbnailData& aThumbnail,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   143
                                            TThumbnailRequestId aId );
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   144
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   145
    void ThumbnailReady(TInt aError, MThumbnailData& aThumbnail, 
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   146
                                            TThumbnailRequestId aId );    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   147
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   148
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   149
private:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   150
    // CActive
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   151
     void DoCancel();
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   152
     void RunL();    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   153
     TInt RunError (TInt aError);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   154
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   155
private:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   156
    // new functions
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   157
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   158
    // CI: erkki missing doxygen comments @param ...
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   159
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   160
    /** CUpnpthumbnailCreator Constructor*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   161
    CUpnpThumbnailCreator(
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   162
            MUpnpThumbnailCreatorObserver& aMUpnpThumbnailCreatorObserver,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   163
            TThumbnailDlnaSize aSize);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   164
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   165
    /** Two Phase constructor -ConstructL method*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   166
    void ConstructL(const TDesC& aFilePath);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   167
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   168
    TSize ConvertDlnaSizeToImageSize();
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   169
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   170
    /** Query to Metadata engine*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   171
    void QueryMdeL();
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   172
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   173
    /** GetThumbnail from Thumbnailmanager*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   174
    void GetThumbnail();
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   175
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   176
    /** Pepare the filepath for thumbnail storage*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   177
    void PrepareThumbnailFilePathL();
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   178
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   179
    /** Notifies observer*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   180
    void ThumbnailReady( TInt aErr );
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   181
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   182
    /** Uses ICL encoder to Encode and Save the thumbnail*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   183
    void EncodeAndSaveThumbnailL();
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   184
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   185
    /** Completes active object*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   186
    void CompleteRequest(TInt aError);
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   187
    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   188
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   189
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   190
private:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   191
    // data
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   192
    CMdESession* iMdESession;  //owned
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   193
    CMdEQuery* iMdEQuery;      //owned
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   194
    CFbsBitmap* iThumbnail;    //owned
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   195
    HBufC* iImageFilePath;     //owned
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   196
    HBufC* iThumbnailFilePath; //owned
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   197
    TInt iObjectid;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   198
    CThumbnailManager* iThmbManager; //owned
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   199
    MUpnpThumbnailCreatorObserver& iMUpnpThumbnailCreatorObserver;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   200
    RFs iFsSession;    //owned
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   201
    CImageEncoder*         iImageEncoder; //owned, encoder from ICL API    
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   202
    TThumbnailCreatorStates iState;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   203
    TThumbnailDlnaSize iThumbnailDlnaSize;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   204
    };
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   205
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   206
#endif  // __UPNPTHUMBNAILCREATOR_H__
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
   207