aiwcommon.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : AiwCommon.h
00004 *  Part of     : Application Interworking Framework / ServiceHandler
00005 *  Interface   : SDK, AIW Criteria API
00006 *  Description : Declares common constants, types, classes etc. to be used both
00007 *                consumer and provider side.
00008 *  Version     :
00009 *
00010 *  Copyright © 2003-2005 Nokia. All rights reserved.
00011 *  This material, including documentation and any related 
00012 *  computer programs, is protected by copyright controlled by 
00013 *  Nokia. All rights are reserved. Copying, including 
00014 *  reproducing, storing, adapting or translating, any 
00015 *  or all of this material requires the prior written consent of 
00016 *  Nokia. This material also contains confidential 
00017 *  information which may not be disclosed to others without the 
00018 *  prior written consent of Nokia.
00019 * ============================================================================
00020 */
00021 
00022 #ifndef AIW_COMMON_H
00023 #define AIW_COMMON_H
00024 
00025 // INCLUDES
00026 #include <aiwcommon.hrh>
00027 #include <barsread.h> 
00028 #include <aiwgenericparam.h>
00029 
00030 // CONSTANTS
00031 
00032 // MACROS
00033 
00034 // FUNCTION PROTOTYPES
00035 
00036 // FORWARD DECLARATIONS
00037 class CEikMenuPane;
00038 class CAiwGenericParamList;
00039 
00040 // CLASS DECLARATION
00041 
00052 class CAiwCriteriaItem : public CBase
00053     {
00054     public:   // Constructors and destructor
00060         IMPORT_C static CAiwCriteriaItem* NewL();
00061 
00068         IMPORT_C static CAiwCriteriaItem* NewLC();
00069 
00078         IMPORT_C static CAiwCriteriaItem* NewL(
00079             TInt aCriteriaId,
00080             TInt aServiceCmd,
00081             const TDesC8& aContentType);
00082 
00092         IMPORT_C static CAiwCriteriaItem* NewLC(
00093             TInt aCriteriaId,
00094             TInt aServiceCmd,
00095             const TDesC8& aContentType);
00096 
00100         IMPORT_C virtual ~CAiwCriteriaItem();
00101 
00102     public: // New functions
00108         IMPORT_C void SetId(TInt aId);
00109 
00115         IMPORT_C void SetServiceClass(const TUid& aServiceUid);
00116         
00122         IMPORT_C void SetServiceCmd(TInt aServiceCmd);
00123 
00129         IMPORT_C void SetContentTypeL(const TDesC8& aContentType);
00130 
00136         IMPORT_C TInt Id() const;
00137 
00143         IMPORT_C const TUid& ServiceClass() const;
00144         
00150         IMPORT_C TInt ServiceCmd() const;
00151 
00157         IMPORT_C const TDesC8& ContentType() const;
00158 
00164         IMPORT_C void SetOptions(TUint aOptions);
00165 
00171         IMPORT_C TUint Options() const;
00172 
00178         IMPORT_C TInt MaxProviders() const;
00179 
00185         IMPORT_C void ReadFromResoureL(TResourceReader& aReader);
00186 
00192         IMPORT_C TUid DefaultProvider() const;
00193 
00199         IMPORT_C void SetDefaultProvider(TInt aDefault);
00200 
00209         IMPORT_C TBool operator==(const CAiwCriteriaItem& aItem);
00210 
00216         IMPORT_C void SetMaxProviders(TInt aMaxProviders);
00217 
00218     public:
00224         inline TBool RomOnly() const;
00225 
00226     private:
00230         CAiwCriteriaItem();    
00231     
00235         void ConstructL();
00236         
00240         void ConstructL(
00241             TInt aCriteriaId,
00242             TInt aServiceCmd,
00243             const TDesC8& aContentType);
00244 
00245     private:
00246         // Criteria ID.
00247         TInt iCriteriaId;
00248         // Service class UID
00249         TUid iServiceClass;
00250         // Service command UID
00251         TInt iServiceCmd;
00252         // Content type (MIME type). 
00253         HBufC8* iContentType;
00254         // Additional options
00255         TAiwVariant iOptions;
00256         //Default provider implementation uid
00257         TUid iDefaultProvider;
00258         // Reserved member
00259         TAiwVariant iReserved;
00260         // Max providers
00261         TInt iMaxProviders;
00262     };
00263 
00264 
00265 inline TBool CAiwCriteriaItem::RomOnly() const
00266     {
00267     return (Options() & AIW_OPTIONS_ROM_ONLY) != 0;
00268     }
00269 
00270 
00274 typedef RPointerArray<CAiwCriteriaItem> RCriteriaArray;
00275 
00287 class MAiwNotifyCallback
00288     {
00289     public:
00302         virtual TInt HandleNotifyL(
00303             TInt aCmdId,
00304             TInt aEventId,
00305             CAiwGenericParamList& aEventParamList,
00306             const CAiwGenericParamList& aInParamList) = 0;
00307     };
00308 
00309 // AIW_COMMON_H
00310 #endif
00311 
00312 // End of File
00313 
00314 

Copyright © Nokia Corporation 2001-2008
Back to top