videofeeds/vcnsuiengine/inc/vcxnsservice.h
branchRCL_3
changeset 57 befca0ec475f
parent 0 96612d01cf9f
equal deleted inserted replaced
56:839377eedc2b 57:befca0ec475f
       
     1 /*
       
     2 * Copyright (c) 2008 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_VCXNSVODSERVICE_H
       
    22 #define C_VCXNSVODSERVICE_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 _LIT( KVcxNsVideoDirectory, "qtn_iptv_video_directory_list" );
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  *  CVcxNsService
       
    34  * 
       
    35  * @lib vcxnsuiengine.lib
       
    36  */
       
    37 class CVcxNsService : public CBase
       
    38     {
       
    39     
       
    40 public:
       
    41 
       
    42     /**
       
    43      * Service's update status enum.
       
    44      */
       
    45     typedef enum
       
    46         {
       
    47         ENotUpdating = 0,
       
    48         EUpdatePending,
       
    49         EStartingPending,
       
    50         EUpdateOngoing,
       
    51         EUpdateFailed,
       
    52         } TServiceUpdateStatus;
       
    53     
       
    54     /**
       
    55     * VOD feed type information 
       
    56     */
       
    57     typedef enum 
       
    58         {
       
    59         EVcxNsReadOnly = 0,
       
    60         EVcxNsEditable,
       
    61         EVcxNsMainGroup,
       
    62         EVcxNsVideoDirectory,
       
    63         EVcxNsGroupedVod,
       
    64         EVcxNsGroupedBrowser,
       
    65         EVcxNsGroupedSearch,
       
    66         EVcxNsGroupedUpload
       
    67         } TVcxNsVodServiceType;
       
    68 
       
    69      /**
       
    70      * Constructor
       
    71      */
       
    72     static CVcxNsService* NewL();
       
    73 
       
    74     /**
       
    75      * Destructor
       
    76      */
       
    77     virtual ~CVcxNsService();
       
    78 
       
    79     /**
       
    80      * GetName
       
    81      * @return Name
       
    82      */
       
    83     IMPORT_C const TDesC& GetName();
       
    84     
       
    85     /**
       
    86      * GetDesc
       
    87      * @return Description
       
    88      */
       
    89     IMPORT_C const TDesC& GetDesc();
       
    90     
       
    91     /**
       
    92      * GetIconPath
       
    93      * @return IconPath
       
    94      */
       
    95     IMPORT_C const TDesC& GetIconPath();
       
    96     
       
    97     /**
       
    98      * GetUserName
       
    99      * @return User name
       
   100      */
       
   101     IMPORT_C const TDesC& GetUserName();
       
   102         
       
   103     /**
       
   104      * GetPassword
       
   105      * @return Password
       
   106      */
       
   107     IMPORT_C const TDesC& GetPassword();
       
   108     
       
   109     /**
       
   110      * GetUpdateTime 
       
   111      * @return update time
       
   112      */
       
   113     IMPORT_C TTime GetUpdateTime();
       
   114         
       
   115     /**
       
   116      * GetUpdateStatus
       
   117      * @return Update status
       
   118      */
       
   119     IMPORT_C TServiceUpdateStatus GetUpdateStatus();
       
   120 
       
   121     /**
       
   122      * GetIap
       
   123      * @return Iap
       
   124      */
       
   125     IMPORT_C TUint32 GetIap();
       
   126     
       
   127     /**
       
   128      * GetIsReadOnlyIap
       
   129      * @return Is read only iap
       
   130      */
       
   131     IMPORT_C TBool GetIsReadOnlyIap();
       
   132     
       
   133     /**
       
   134      * Get simplified service type.
       
   135      * @return Service type
       
   136      */
       
   137     IMPORT_C TVcxNsVodServiceType Type() const;
       
   138 
       
   139     /**
       
   140      * Get account management uri.
       
   141      * @return Account management uri. 
       
   142      * KNullDesC() if not available.
       
   143      */
       
   144     IMPORT_C const TDesC& AccountMgmtUri();
       
   145     
       
   146     /**
       
   147      * Get service custom URI.
       
   148      * @return Custom uri
       
   149      */
       
   150     const TDesC& CustomUri();
       
   151     
       
   152     /**
       
   153      * SetNameL
       
   154      * @param aName Name
       
   155      */
       
   156     void SetNameL( const TDesC& aName );
       
   157 
       
   158     /**
       
   159      * SetDescL
       
   160      * @param aDesc Description
       
   161      */
       
   162     void SetDescL( const TDesC& aDesc );
       
   163     
       
   164     /**
       
   165      * SetIconPathL
       
   166      * @param aPath icon path
       
   167      */
       
   168     void SetIconPathL(  const TDesC& aPath );
       
   169     
       
   170     /**
       
   171      * SetUserNameL
       
   172      * @param aUserName Username
       
   173      */
       
   174     void SetUserNameL( const TDesC& aUserName );
       
   175     
       
   176     /**
       
   177      * SetPasswordL
       
   178      * @param aPassword Password
       
   179      */
       
   180     void SetPasswordL( const TDesC& aPassword );
       
   181     
       
   182     /**
       
   183      * SetServiceId
       
   184      * @param iServiceId Service Id 
       
   185      */
       
   186     void SetServiceId( const TUint32 iServiceId );
       
   187 
       
   188     /**
       
   189      * GetServiceId
       
   190      * @return Service Id 
       
   191      */
       
   192     IMPORT_C TUint32 GetServiceId();
       
   193     
       
   194     /**
       
   195      * SetUpdateTime
       
   196      * @param aTime Update time
       
   197      */
       
   198     void SetUpdateTime( const TTime aTime );
       
   199 
       
   200     /**
       
   201      * SetUpdateStatus
       
   202      * @param aUpdateStatus Update status
       
   203      */
       
   204     void SetUpdateStatus( const TServiceUpdateStatus aUpdateStatus );
       
   205     
       
   206     /**
       
   207      * SetIap
       
   208      * @param aIap Iap id
       
   209      */
       
   210     void SetIap( const TUint32 aIap );
       
   211     
       
   212     /**
       
   213      * SetIsReadOnlyIap
       
   214      * @param aIsReadOnlyIap Is read only iap
       
   215      */
       
   216     void SetIsReadOnlyIap( const TBool aIsReadOnlyIap );
       
   217     
       
   218     /**
       
   219      * Set browser url for browser type service
       
   220      * @param aCustomUri Custom uri
       
   221      */
       
   222     void SetCustomUriL( const TDesC& aCustomUri ); 
       
   223     
       
   224     /**
       
   225      * Set type of the service
       
   226      * @param aType Service type
       
   227      */
       
   228     void SetType( const CVcxNsService::TVcxNsVodServiceType aType );
       
   229     
       
   230     /**
       
   231      * Set account management url for service
       
   232      * @param aAccountMgmtUri Account management uri.
       
   233      */
       
   234     void SetAccountMgmtUriL( const TDesC& aAccountMgmtUri );
       
   235 
       
   236     /**
       
   237      * Set group id.
       
   238      * @param aGroupId Group id
       
   239      */
       
   240     void SetGroupId( const TUint32 aGroupId );
       
   241     
       
   242     /**
       
   243      * Get group id.
       
   244      * @return Service group id.
       
   245      */
       
   246     TUint32 GroupId();
       
   247     
       
   248     /**
       
   249      * Add sub service to service group.
       
   250      * @param aSubService Groupped service. Ownership transferred here.
       
   251      * Leaves with KErrArgument if aSubService is NULL or if service type
       
   252      * is something else than EVcxNsMainGroup.
       
   253      */
       
   254     void AddSubServiceL( CVcxNsService* aSubService );
       
   255     
       
   256     /**
       
   257      * Return service group.
       
   258      * @return Array of groupped services.
       
   259      */
       
   260     RPointerArray<CVcxNsService>& ServiceGroup();
       
   261 
       
   262     /**
       
   263      * Set highlighted category index.
       
   264      * @param aIndex Highlighted index.
       
   265      */
       
   266     void SetHighlightCategoryIndex( TInt aIndex );
       
   267 
       
   268     /**
       
   269      * Return service group.
       
   270      * @return Highlighted index.
       
   271      */
       
   272     TInt HighlightCategoryIndex();
       
   273 
       
   274 private:
       
   275 
       
   276     /**
       
   277      * Constructor
       
   278      */
       
   279     CVcxNsService();
       
   280 
       
   281 private: //Data
       
   282 
       
   283     /**
       
   284      * Name.
       
   285      * Own.
       
   286      */
       
   287     HBufC* iName;
       
   288 
       
   289     /**
       
   290      * Icon path.
       
   291      * Own.
       
   292      */
       
   293     HBufC* iIconPath;
       
   294 
       
   295     /**
       
   296      * User name
       
   297      * Own.
       
   298      */
       
   299     HBufC* iUserName;
       
   300 
       
   301     /**
       
   302      * Password
       
   303      * Own.
       
   304      */
       
   305     HBufC* iPassword;
       
   306     
       
   307     /**
       
   308      * Service id.
       
   309      */
       
   310     TUint32 iServiceId;
       
   311     
       
   312     /**
       
   313      * Last updated time
       
   314      */
       
   315     TTime iUpdateTime;
       
   316     
       
   317     /**
       
   318      * Current update status.
       
   319      */    
       
   320     TServiceUpdateStatus iUpdateStatus;
       
   321     
       
   322     /**
       
   323      * Access point.
       
   324      */   
       
   325     TUint32 iIap;
       
   326     
       
   327     /**
       
   328      * Flag for read only iap.
       
   329      */
       
   330     TBool iIsReadOnlyIap;
       
   331     
       
   332     /**
       
   333      * Optional URI for browser service
       
   334      * Own.
       
   335      */
       
   336     HBufC* iCustomUri;
       
   337     
       
   338     /**
       
   339      * Service type. 
       
   340      */
       
   341     TVcxNsVodServiceType iType;
       
   342     
       
   343     /**
       
   344      * Service description
       
   345      * Own.
       
   346      */
       
   347     HBufC* iDescription;
       
   348     
       
   349     /**
       
   350      * Account management uri
       
   351      * Own.
       
   352      */
       
   353     HBufC* iAccountMgmtUri;
       
   354     
       
   355     /**
       
   356      * Service group id.
       
   357      */
       
   358     TUint32 iGroupId;
       
   359     
       
   360     /**        
       
   361     * Groupped services.
       
   362     * Own.
       
   363     */
       
   364     RPointerArray<CVcxNsService> iServiceGroup;
       
   365     
       
   366     /**        
       
   367     * Highlighted category index for service.
       
   368     * By default, always 0.
       
   369     */
       
   370     TInt iHighlightIndex;
       
   371 
       
   372     };
       
   373 
       
   374 #endif // C_VCXNSVODSERVICE_H