javauis/mmapi_akn/baseline/inc/cmmametadatacontrol.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2002 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:  This interface is for getting metadata from a media.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMMAMETADATACONTROL_H
       
    20 #define CMMAMETADATACONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "cmmacontrol.h"
       
    24 
       
    25 //  CLASS DECLARATION
       
    26 /**
       
    27 *   This class is an abstract interface for getting metadata from a media.
       
    28 *
       
    29 *
       
    30 */
       
    31 
       
    32 NONSHARABLE_CLASS(CMMAMetaDataControl): public CMMAControl
       
    33 {
       
    34 protected:
       
    35     CMMAMetaDataControl();
       
    36 
       
    37 public:
       
    38     /**
       
    39     * Get the number of all metadata keys from given metadata control.
       
    40     *
       
    41     * @param aMetaDataControl Metadata control.
       
    42     * @param aCount Address of an integer to store the metadata keys count
       
    43     */
       
    44     static void StaticKeysCountL(CMMAMetaDataControl* aMetaDataControl, TInt *aCount);
       
    45 
       
    46     /**
       
    47     * Get one metadata key from given metadata control.
       
    48     *
       
    49     * @param aMetaDataControl Metadata control.
       
    50     * @param aValue Address of a pointer to a descriptor to which the
       
    51     *        value is put. Ownership of the descriptor is transferred to
       
    52     *        the caller.
       
    53     * @param aIndex The index of the key to be fetched.
       
    54     */
       
    55     static void StaticKeyL(CMMAMetaDataControl* aMetaDataControl, HBufC** aKey, TInt aIndex);
       
    56 
       
    57     /**
       
    58     * Get the value associated with a single metadata key.
       
    59     *
       
    60     * @param aMetaDataControl Metadata control.
       
    61     * @param aValue Address of a pointer to a descriptor to which the
       
    62     *        value is put. Ownership of the descriptor is transferred to
       
    63     *        the caller.
       
    64     * @param aKey The key for which the value is to be fetched.
       
    65     */
       
    66     static void StaticKeyValueL(CMMAMetaDataControl* aMetaDataControl,
       
    67                                 HBufC** aValue,
       
    68                                 TDesC* aKey);
       
    69 
       
    70 protected:
       
    71     virtual TInt KeyCountL() = 0;
       
    72     virtual HBufC* KeyL(TInt aIndex) = 0;
       
    73 
       
    74     virtual HBufC* KeyValueL(const TDesC& aKey) = 0;
       
    75 
       
    76 public: // From CMMAControl
       
    77     const TDesC& ClassName() const;
       
    78 };
       
    79 
       
    80 #endif // CMMAMETADATACONTROL_H