videoutils_plat/videoplayer_constants_api/inc/vcxmyvideosdefs.h
branchRCL_3
changeset 16 1dbd6ed29a76
parent 15 913622afaa4b
child 18 64f6657d3cc1
equal deleted inserted replaced
15:913622afaa4b 16:1dbd6ed29a76
    24 #include <e32base.h>
    24 #include <e32base.h>
    25 #include <mpxattribute.h>
    25 #include <mpxattribute.h>
    26 #include <mdeconstants.h>
    26 #include <mdeconstants.h>
    27 #include <mpxcollectionpath.h>
    27 #include <mpxcollectionpath.h>
    28 
    28 
       
    29 #define VIDEO_COLLECTION_PLUGIN_TB92
       
    30 
       
    31 //These are written to TMPXItemId::iId2
       
    32 const TInt KVcxMvcMediaTypeVideo    = 0;
       
    33 const TInt KVcxMvcMediaTypeCategory = 1;
       
    34 const TInt KVcxMvcMediaTypeAlbum    = 2;
       
    35 
    29 /**
    36 /**
    30 * My Videos Collection category IDs.
    37 * My Videos Collection category IDs.
    31 * MPX ID has this as iId1 member and 1 as iId2.
    38 * TMPXItemId has these as iId1 member and KVcxMvcMediaTypeCategory as iId2.
    32 * These are same as indexes in path.
    39 */
    33 */
       
    34 
       
    35 const TInt KVcxMvcCategoryIdAll          = 0;
    40 const TInt KVcxMvcCategoryIdAll          = 0;
    36 const TInt KVcxMvcCategoryIdDownloads    = 1;
    41 const TInt KVcxMvcCategoryIdDownloads    = 1;
    37 const TInt KVcxMvcCategoryIdTvRecordings = 2;
    42 const TInt KVcxMvcCategoryIdTvRecordings = 2;
    38 const TInt KVcxMvcCategoryIdCaptured     = 3;
    43 const TInt KVcxMvcCategoryIdCaptured     = 3;
    39 const TInt KVcxMvcCategoryIdOther        = 4;
    44 const TInt KVcxMvcCategoryIdOther        = 4;
    58 * S60 (v3.1/w31) download manager crashes if url length goes somewhere around
    63 * S60 (v3.1/w31) download manager crashes if url length goes somewhere around
    59 * 1200-1400 so we need to limit it here. If someone finds out that
    64 * 1200-1400 so we need to limit it here. If someone finds out that
    60 * download manager get fixed please feel free to change value to 2048 
    65 * download manager get fixed please feel free to change value to 2048 
    61 */
    66 */
    62 const TInt KVcxMvcMaxUrlLength = 1024;
    67 const TInt KVcxMvcMaxUrlLength = 1024;
       
    68 
       
    69 /**
       
    70 * Maximum length of KMPXMediaGeneralTitle attribute. Limiting factor
       
    71 * comes from MDS.
       
    72 */
       
    73 const TInt KVcxMvcMaxTitleLength = 255;
    63 
    74 
    64 /**
    75 /**
    65 *  Content ID (UID) identifying My Videos category of content provided
    76 *  Content ID (UID) identifying My Videos category of content provided
    66 *  in the media object and associated attributes. 
    77 *  in the media object and associated attributes. 
    67 */
    78 */
   171     * If UI is showing the list under the container which receives this event,
   182     * If UI is showing the list under the container which receives this event,
   172     * UI must fetch new list by calling OpenL().
   183     * UI must fetch new list by calling OpenL().
   173     */
   184     */
   174     EVcxMyVideosVideoListOrderChanged
   185     EVcxMyVideosVideoListOrderChanged
   175     };
   186     };
       
   187 
       
   188 /**
       
   189 * These values are written to video list (received by HandleOpen)
       
   190 * KVcxMediaMyVideosInt32Value attribute to give extra information about the list status.
       
   191 */
       
   192 enum TVcxMyVideosVideoListInfo
       
   193     {    
       
   194     /**
       
   195     * Indicates that the list is complete and no more items are appended
       
   196     * to the list by KVcxMessageMyVideosItemsAppended event.
       
   197     */ 
       
   198     EVcxMyVideosVideoListComplete
       
   199     };
   176     
   200     
   177 //
   201 //
   178 // These are the general attributes used in My Videos media object.
   202 // These are the general attributes used in My Videos media object.
   179 // "(BRIEF)" means that this field is filled when requesting list of videos from
   203 // "(BRIEF)" means that this field is filled when requesting list of videos from
   180 // collection (using OpenL method). Other than "BRIEF" fields must be requested
   204 // collection (using OpenL method). Other than "BRIEF" fields must be requested
   192 //KMPXMediaGeneralId 
   216 //KMPXMediaGeneralId 
   193 
   217 
   194 /**
   218 /**
   195 *  2. (BRIEF)
   219 *  2. (BRIEF)
   196 *  Descriptor, contains video name.
   220 *  Descriptor, contains video name.
       
   221 *  Maximum length is KVcxMvcMaxTitleLength.
   197 *  Saved to MDS.
   222 *  Saved to MDS.
   198 */
   223 */
   199 //KMPXMediaGeneralTitle
   224 //KMPXMediaGeneralTitle
   200 
   225 
   201 /**
   226 /**
   475  */
   500  */
   476 const TMPXAttributeData KVcxMediaMyVideosInt32Value = {KVcxMediaIdMyVideos, 1 << 22};
   501 const TMPXAttributeData KVcxMediaMyVideosInt32Value = {KVcxMediaIdMyVideos, 1 << 22};
   477 
   502 
   478 /**
   503 /**
   479  * 35.
   504  * 35.
       
   505  * TUint32, general parameter, the usage depends on context.
       
   506  * Not saved to MDS
       
   507  */
       
   508 const TMPXAttributeData KVcxMediaMyVideosUint32Value = {KVcxMediaIdMyVideos, 1 << 23};
       
   509 
       
   510 /**
       
   511  * 36.
   480  * TUint32, transaction ID, client sets this field when making asynchronous request.
   512  * TUint32, transaction ID, client sets this field when making asynchronous request.
   481  * Collection sets the same ID to response messages. Client can use this to pair
   513  * Collection sets the same ID to response messages. Client can use this to pair
   482  * requests and responses.
   514  * requests and responses.
   483  * Not saved to MDS
   515  * Not saved to MDS
   484  */
   516  */
   485 const TMPXAttributeData KVcxMediaMyVideosTransactionId = {KVcxMediaIdMyVideos, 1 << 23};
   517 const TMPXAttributeData KVcxMediaMyVideosTransactionId = {KVcxMediaIdMyVideos, 1 << 24};
   486 
   518 
   487 /**
   519 /**
   488  * 36.
   520  * 37.
   489  * TBool, video list is partial. This is set to Category level video list to inform
   521  * TBool, video list is partial. This is set to Category level video list to inform
   490  * client that video cache is not complete yet.
   522  * client that video cache is not complete yet.
   491  */
   523  */
   492 const TMPXAttributeData KVcxMediaMyVideosVideoListIsPartial = {KVcxMediaIdMyVideos, 1 << 24};
   524 const TMPXAttributeData KVcxMediaMyVideosVideoListIsPartial = {KVcxMediaIdMyVideos, 1 << 24};
   493 
   525 
   512 const TInt KVcxCommandMyVideosGetMediaFullDetailsByMpxId = 4; //async
   544 const TInt KVcxCommandMyVideosGetMediaFullDetailsByMpxId = 4; //async
   513 const TInt KVcxCommandMyVideosGetMediasByMpxId           = 5; //async
   545 const TInt KVcxCommandMyVideosGetMediasByMpxId           = 5; //async
   514 const TInt KVcxCommandMyVideosMove                       = 6; //async
   546 const TInt KVcxCommandMyVideosMove                       = 6; //async
   515 const TInt KVcxCommandMyVideosCopy                       = 7; //async
   547 const TInt KVcxCommandMyVideosCopy                       = 7; //async
   516 const TInt KVcxCommandMyVideosDelete                     = 8; //async
   548 const TInt KVcxCommandMyVideosDelete                     = 8; //async
       
   549 const TInt KVcxCommandMyVideosAddToAlbum                 = 9; //async
       
   550 const TInt KVcxCommandMyVideosRemoveFromAlbum            = 10; //async
       
   551 const TInt KVcxCommandMyVideosAddAlbum                   = 11; //async & sync
       
   552 const TInt KVcxCommandMyVideosRemoveAlbums               = 12; //async
   517 
   553 
   518 /** This command cancels the move or copy operation only if it
   554 /** This command cancels the move or copy operation only if it
   519  *  is allready being processed by the collection plugin. If the
   555  *  is allready being processed by the collection plugin. If the
   520  *  command is still in queue, this cancel has no effect.
   556  *  command is still in queue, this cancel has no effect.
   521  *  If Move or Copy operations were not in progress the command
   557  *  If Move or Copy operations were not in progress the command
   522  *  leaves with KErrNotFound.
   558  *  leaves with KErrNotFound.
   523  */
   559  */
   524 const TInt KVcxCommandMyVideosCancelMoveOrCopy = 9; //sync
   560 const TInt KVcxCommandMyVideosCancelMoveOrCopy = 13; //sync
   525 
   561 
   526 /** This command cancels the delete operation only if it
   562 /** This command cancels the delete operation only if it
   527  *  is allready being processed by the collection plugin. If the
   563  *  is allready being processed by the collection plugin. If the
   528  *  command is still in queue, this cancel has no effect.
   564  *  command is still in queue, this cancel has no effect.
   529  *  If delete operation was not in progress the command
   565  *  If delete operation was not in progress the command
   530  *  leaves with KErrNotFound.
   566  *  leaves with KErrNotFound.
   531  */
   567  */
   532 const TInt KVcxCommandMyVideosCancelDelete = 10; //sync
   568 const TInt KVcxCommandMyVideosCancelDelete = 14; //sync
   533 
   569 
   534 const TInt KVcxMessageMyVideosGetMediasByMpxIdResp = 11;
   570 const TInt KVcxMessageMyVideosGetMediasByMpxIdResp = 15;
   535 
   571 
   536 /**
   572 /**
   537 * Collection sends this message when new items are added
   573 * Collection sends this message when new items are added
   538 * to the end of the collection plugins cache. If client has not yet received
   574 * to the end of the collection plugins cache. If client has not yet received
   539 * KVcxMessageMyVideosListComplete event, then the media list received with
   575 * KVcxMessageMyVideosListComplete event, then the media list received with
   542 * call to keep collection frameworks path variable updated.
   578 * call to keep collection frameworks path variable updated.
   543 * KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events
   579 * KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events
   544 * are broadcasted to all clients. So they might appear even when client hasn't
   580 * are broadcasted to all clients. So they might appear even when client hasn't
   545 * done OpenL.
   581 * done OpenL.
   546 */
   582 */
   547 const TInt KVcxMessageMyVideosItemsAppended = 12; //event
   583 const TInt KVcxMessageMyVideosItemsAppended = 16; //event
   548 
   584 
   549 /**
   585 /**
   550 * Collection sends this message when media list fetching has ended
   586 * Collection sends this message when media list fetching has ended
   551 * and no more KVcxMessageMyVideosItemsAppended events will be sent.
   587 * and no more KVcxMessageMyVideosItemsAppended events will be sent.
   552 * Collection also cuts off the shared memory connection to video lists
   588 * Collection also cuts off the shared memory connection to video lists
   553 * between clients and collection. Ie, if new KVcxMessageMyVideosItemsAppended
   589 * between clients and collection. Ie, if new KVcxMessageMyVideosItemsAppended
   554 * events arrive after this event, the client knows that they are not automatically
   590 * events arrive after this event, the client knows that they are not automatically
   555 * in the list it had received earlier (unless client itself initiated the new fetching
   591 * in the list it had received earlier (unless client itself initiated the new fetching
   556 * by calling OpenL().
   592 * by calling OpenL().
   557 */
   593 */
   558 const TInt KVcxMessageMyVideosListComplete = 13; //event
   594 const TInt KVcxMessageMyVideosListComplete = 17; //event
   559 
   595 
   560 /* Collection sends this message when it starts processing
   596 /* Collection sends this message when it starts processing
   561  * Move Or Copy command. When this event is received,
   597  * Move Or Copy command. When this event is received,
   562  * KVcxCommandMyVideosCancelMoveOrCopy can be sent. 
   598  * KVcxCommandMyVideosCancelMoveOrCopy can be sent. 
   563  */
   599  */
   564 const TInt KVcxMessageMyVideosMoveOrCopyStarted = 14; //event
   600 const TInt KVcxMessageMyVideosMoveOrCopyStarted = 18; //event
   565 
   601 
   566 /* Collection sends this message when it starts processing
   602 /* Collection sends this message when it starts processing
   567  * KVcxCommandMyVideosDelete command. After this event is received,
   603  * KVcxCommandMyVideosDelete command. After this event is received,
   568  * KVcxCommandMyVideosCancelDelete can be sent. 
   604  * KVcxCommandMyVideosCancelDelete can be sent. 
   569  */
   605  */
   570 const TInt KVcxMessageMyVideosDeleteStarted = 15; //event
   606 const TInt KVcxMessageMyVideosDeleteStarted = 19; //event
   571 
   607 
   572 /* End events for Move/Copy/Delete operations. The response contains
   608 /* End events for Move/Copy/Delete operations. The response contains
   573  * MDS ID and error codes for each item.
   609  * MDS ID and error codes for each item.
   574  */
   610  */
   575 const TInt KVcxMessageMyVideosMoveResp   = 16; //event 
   611 const TInt KVcxMessageMyVideosMoveResp   = 20; //event 
   576 const TInt KVcxMessageMyVideosCopyResp   = 17; //event
   612 const TInt KVcxMessageMyVideosCopyResp   = 21; //event
   577 const TInt KVcxMessageMyVideosDeleteResp = 18; //event
   613 const TInt KVcxMessageMyVideosDeleteResp = 22; //event
   578 
   614 
   579 /**
   615 /**
   580 * Indicates that media array variable contains other messages.
   616 * Indicates that media array variable contains other messages.
   581 * This message is only sent as the highest level item in the message tree.
   617 * This message is only sent as the highest level item in the message tree.
   582 */
   618 */
   583 const TInt KVcxMessageMyVideosMessageArray = 19;
   619 const TInt KVcxMessageMyVideosMessageArray = 23;
   584 
   620 
   585 /*
   621 /*
   586  OpenL() (video list) MSC
   622  OpenL() (video list) MSC
   587  ------------------------
   623  ------------------------
   588  Opening the collection is quite complicated due the fact that it allows multiple clients to open
   624  Opening the collection is quite complicated due the fact that it allows multiple clients to open
   589  video list at the same time. The scenario described below involves video list fetching from MDS. If the collection
   625  video list at the same time. The scenario described below involves video list fetching from MDS. If the collection
   590  has the video list already fetched, then the HandleOpenL will contain all videos and KVcxMessageMyVideosListComplete
   626  has the video list already fetched, then the HandleOpenL will contain all videos and KVcxMessageMyVideosListComplete
   591  is received immedetially.
   627  is received immedetially.
   592  
   628  
   593  KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events concern only video lists.
   629  The list complete status (EVcxMyVideosVideoListComplete) is also written to aEntries KVcxMediaMyVideosInt32Value
   594  Category level always returns all categories at HandleOpenL.
   630  attribute when the list is complete. 
   595  
   631   
   596                  .------.                                                                 .-------------------------.
   632                  .------.                                                                 .-------------------------.
   597                  |CLIENT|                                                                 |MPX My Videos Collection |
   633                  |CLIENT|                                                                 |MPX My Videos Collection |
   598                  '------'                                                                 '-------------------------'
   634                  '------'                                                                 '-------------------------'
   599                     |                                                                                  |
   635                     |                                                                                  |
   600                     |                                                                                  |
   636                     |                                                                                  |
   635                     |  after this point (without client doing OpenL()), it means that someone else     |
   671                     |  after this point (without client doing OpenL()), it means that someone else     |
   636                     |  changed sorting order and started fetching new video list.                      |
   672                     |  changed sorting order and started fetching new video list.                      |
   637                     |  In that case this client should also fetch new list by calling OpenL().         |
   673                     |  In that case this client should also fetch new list by calling OpenL().         |
   638                     |<---------------------------------------------------------------------------------|
   674                     |<---------------------------------------------------------------------------------|
   639                     |                                                                                  |
   675                     |                                                                                  |
   640                     |                                                                                  |
       
   641 
       
   642 
       
   643  DOWNLOAD START MSC
       
   644  ------------------
       
   645  
       
   646  In future download request parameters can be made to contain media array of download parameters,
       
   647  allowing multiple downloads. Currently it is not supported.
       
   648  
       
   649                  .------.                                                                 .-------------------------.
       
   650                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   651                  '------'                                                                 '-------------------------'
       
   652                     |                                                                                  |
       
   653                     |                                                                                  |
       
   654 iCollectionUtility->Collection().CommandL( *downloadStartCommand )                                     |
       
   655                                                                                                        |
       
   656 downloadStartCommand (CMPXCommand type) contains:                                                      |
       
   657     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   658     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosStartDownload                                  |
       
   659     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   660     KMPXCommandColAddMedia         = Download request parameters (CMPXMedia type)                      |
       
   661         Download request parameters CMPXMedia type) contains:                                          |
       
   662             KVcxMediaMyVideosIapId     = IAP ID                                                        |
       
   663             KVcxMediaMyVideosUsername  = User name                                                     |
       
   664             KVcxMediaMyVideosPassword  = Password                                                      |
       
   665             KMPXMediaGeneralFlags      = EVcxMyVideosServiceHasReadOnlyIap|EVcxMyVideosSilent          |
       
   666             KVcxMediaMyVideosRemoteUrl = Remote URL                                                    |
       
   667             KMPXMediaGeneralTitle      = Video title                                                   |
       
   668                     |--------------------------------------------------------------------------------->|
       
   669                     |                                                                                  |
       
   670                     |                                                                                  |
       
   671                     |  HandleCommandComplete(downloadStartCommand, FAIL/SUCCESS)                       |
       
   672                     |<---------------------------------------------------------------------------------|
       
   673                     |                                                                                  |
       
   674                     |                                                                                  |
       
   675                     |                                                                                  |
       
   676                     |  HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                   |
       
   677                     |                                                                                  |
       
   678                     |  aMessage contains:                                                              |
       
   679                     |      KMPXMessageGeneralId       = KMPXMessageIdItemChanged                       |
       
   680                     |      KMPXMessageChangeEventType = EMPXItemInserted                               |
       
   681                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
       
   682                     |      KMPXMessageMediaGeneralId  = MPX ID                                         |
       
   683                     |                                                                                  |
       
   684                     |  The corresponding media object contains:                                        |
       
   685                     |      KMPXMediaGeneralId         = MPX ID                                         |
       
   686                     |      KMPXMediaGeneralUri        = Local file path                                |
       
   687                     |      KVcxMediaMyVideosRemoteUrl = Remote URL                                     |
       
   688                     |<---------------------------------------------------------------------------------|
       
   689                     |                                                                                  |
       
   690                     |                                                                                  |
       
   691                     |                                                                                  |
       
   692                     |                                                                                  |
       
   693                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
   694                     |                                                                                  |
       
   695                     |  aMessage contains:                                                              |
       
   696                     |      KMPXMessageGeneralId       = KMPXMessageIdItemChanged                       |
       
   697                     |      KMPXMessageChangeEventType = EMPXItemModified                               |
       
   698                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
       
   699                     |     KMPXMessageMediaGeneralId   = MPX ID                                         |
       
   700                     |                                                                                  |
       
   701                     | The corresponding media object contains:                                         |
       
   702                     |      KMPXMediaGeneralId             = MPX ID                                 |
       
   703                     |      KVcxMediaMyVideosDownloadState = Download state                             |
       
   704                     |      KVcxMediaMyVideosDownloadId    = Download ID                                |
       
   705                     |<---------------------------------------------------------------------------------|
       
   706                     |                                                                                  |
       
   707                     |                                                                                  |
       
   708 
       
   709 
       
   710 
       
   711 DOWNLOAD CANCEL MSC
       
   712 -------------------
       
   713  
       
   714                  .------.                                                                 .-------------------------.
       
   715                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   716                  '------'                                                                 '-------------------------'
       
   717                     |                                                                                  |
       
   718                     |                                                                                  |
       
   719 iCollectionUtility->Collection().CommandL( *cancelDownloadCommand )                                    |
       
   720                                                                                                        |
       
   721 cancelDownloadCommand (CMPXCommand type) contains:                                                     |
       
   722     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   723     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosCancelDownload                                 |
       
   724     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   725     KMPXCommandColAddMedia         = Cancel download request parameters (CMPXMedia type)               |
       
   726         Cancel download request parameters (CMPXMedia type) contains:                                  |
       
   727         KMPXMediaGeneralId          = MPX ID                                                           |
       
   728         KVcxMediaMyVideosDownloadId = download ID                                                      |
       
   729         KMPXMediaGeneralUri         = file path                                                        |                                        
       
   730                     |--------------------------------------------------------------------------------->|
       
   731                     |                                                                                  |
       
   732                     |                                                                                  |
       
   733                     |   HandleCommandComplete(cancelDownloadCommand, TInt aError )                     |
       
   734                     |      aError is != KErrNone if either dl object (in Download Manager), file or    |
       
   735                     |      MPX object was left to system.                                              |
       
   736                     |<---------------------------------------------------------------------------------|
       
   737                     |                                                                                  |
       
   738                     |                                                                                  |
       
   739                     |                                                                                  |
       
   740                     |   HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                  |
       
   741                     |                                                                                  |
       
   742                     |   aMessage contains:                                                             |
       
   743                     |       KMPXMessageGeneralId       = KMPXMessageIdItemChanged                      |
       
   744                     |       KMPXMessageChangeEventType = EMPXItemDeleted                               |
       
   745                     |       KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                  |
       
   746                     |       KMPXMessageMediaGeneralId  = MPX ID                                        |
       
   747                     |                                                                                  |
       
   748                     |       The corresponding media object is gone                                     |
       
   749                     |<---------------------------------------------------------------------------------|
       
   750                     |                                                                                  |
   676                     |                                                                                  |
   751 
   677 
   752 
   678 
   753 GET MEDIA FULL DETAILS BY MPX ID MSC
   679 GET MEDIA FULL DETAILS BY MPX ID MSC
   754 ------------------------------------
   680 ------------------------------------
   783 
   709 
   784 GET MEDIAS BY MPX ID MSC
   710 GET MEDIAS BY MPX ID MSC
   785 ------------------------
   711 ------------------------
   786 
   712 
   787  This command loads requested MDS items to MPX My Videos collection cache and returns the requested
   713  This command loads requested MDS items to MPX My Videos collection cache and returns the requested
   788  items to the client ( subset of the cache ).
   714  items to the client ( subset of the cache ). Notice that if this command is given while OpenL is
       
   715  being processed, then OpenL is interrupted and started from scratch when this command finishes.
   789  
   716  
   790                  .------.                                                                 .-------------------------.
   717                  .------.                                                                 .-------------------------.
   791                  |CLIENT|                                                                 |MPX My Videos Collection |
   718                  |CLIENT|                                                                 |MPX My Videos Collection |
   792                  '------'                                                                 '-------------------------'
   719                  '------'                                                                 '-------------------------'
   793                     |                                                                                  |
   720                     |                                                                                  |
   817                     |      KMPXMediaArrayContents     = Media array (CMPXMediaArray)                   |
   744                     |      KMPXMediaArrayContents     = Media array (CMPXMediaArray)                   |
   818                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
   745                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
   819                     |<---------------------------------------------------------------------------------|
   746                     |<---------------------------------------------------------------------------------|
   820                     |                                                                                  |                 
   747                     |                                                                                  |                 
   821 
   748 
   822 DOWNLOAD PAUSE MSC
       
   823 -------------------
       
   824  
       
   825                  .------.                                                                 .-------------------------.
       
   826                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   827                  '------'                                                                 '-------------------------'
       
   828                     |                                                                                  |
       
   829                     |                                                                                  |
       
   830 iCollectionUtility->Collection().CommandL( *pauseDownloadCommand )                                     |
       
   831                                                                                                        |
       
   832 cancelDownloadCommand (CMPXCommand type) contains:                                                     |
       
   833     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   834     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosPauseDownload                                  |
       
   835     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   836     KVcxMediaMyVideosDownloadId    = download id                                                       |
       
   837                     |--------------------------------------------------------------------------------->|
       
   838                     |                                                                                  |
       
   839                     |                                                                                  |
       
   840                     |   HandleCommandComplete(pauseDownloadCommand, FAIL/SUCCESS)                      |
       
   841                     |<---------------------------------------------------------------------------------|
       
   842                     |                                                                                  |
       
   843                     |                                                                                  |
       
   844                     |                                                                                  |
       
   845                     |   HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                  |
       
   846                     |                                                                                  |
       
   847                     |   aMessage contains:                                                             |
       
   848                     |       KMPXMessageGeneralId       = KMPXMessageIdItemChanged                      |
       
   849                     |       KMPXMessageChangeEventType = EMPXItemModified                              |
       
   850                     |       KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                  |
       
   851                     |       KMPXMessageMediaGeneralId  = MPX ID                                        |
       
   852                     |<---------------------------------------------------------------------------------|
       
   853                     |                                                                                  |
       
   854 
       
   855 DOWNLOAD RESUME MSC
       
   856 -------------------
       
   857  
       
   858                  .------.                                                                 .-------------------------.
       
   859                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   860                  '------'                                                                 '-------------------------'
       
   861                     |                                                                                  |
       
   862                     |                                                                                  |
       
   863 iCollectionUtility->Collection().CommandL( *downloadStartCommand )                                     |
       
   864                                                                                                        |
       
   865 downloadStartCommand (CMPXCommand type) contains:                                                      |
       
   866     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   867     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosStartDownload                                  |
       
   868     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   869     KMPXCommandColAddMedia         = Download request parameters (CMPXMedia type)                      |
       
   870         Download request parameters (CMPXMedia type) contains:                                         |
       
   871             KVcxMediaMyVideosIapId      = IAP ID                                                       |
       
   872             KVcxMediaMyVideosUsername   = User name                                                    |
       
   873             KVcxMediaMyVideosPassword   = Password                                                     |
       
   874             KMPXMediaGeneralFlags       = EVcxMyVideosServiceHasReadOnlyIap|EVcxMyVideosSilent         |
       
   875             KVcxMediaMyVideosDownloadId = Download ID                                                  |
       
   876                     |--------------------------------------------------------------------------------->|
       
   877                     |                                                                                  |
       
   878                     |                                                                                  |
       
   879                     |  HandleCommandComplete(downloadStartCommand, FAIL/SUCCESS)                       |
       
   880                     |<---------------------------------------------------------------------------------|
       
   881                     |                                                                                  |
       
   882                     |                                                                                  |
       
   883                     |                                                                                  |
       
   884                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
   885                     |                                                                                  |
       
   886                     |  aMessage contains:                                                              |
       
   887                     |      KMPXMessageGeneralId       = KMPXMessageIdItemChanged                       |
       
   888                     |      KMPXMessageChangeEventType = EMPXItemModified                               |
       
   889                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
       
   890                     |      KMPXMessageMediaGeneralId  = MPX ID                                         |
       
   891                     |                                                                                  |
       
   892                     | The corresponding media object contains:                                         |
       
   893                     |      KMPXMediaGeneralId             = MPX ID                                     |
       
   894                     |      KVcxMediaMyVideosDownloadState = Download state                             |
       
   895                     |      KVcxMediaMyVideosDownloadId    = Download ID                                |
       
   896                     |<---------------------------------------------------------------------------------|
       
   897                     |                                                                                  |
       
   898                     |                                                                                  |
       
   899 
   749 
   900 VIDEO ADD MSC
   750 VIDEO ADD MSC
   901 -------------
   751 -------------
   902 
   752 
   903 Currently only synchronous version is supported. Only one item can be added per call. This is currently
   753 Currently only synchronous version is supported. Only one item can be added per call. This is currently
  1022                     |          Media array contains array of CMPXMedia objects which contain:          |
   872                     |          Media array contains array of CMPXMedia objects which contain:          |
  1023                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
   873                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
  1024                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
   874                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
  1025                     |<---------------------------------------------------------------------------------|
   875                     |<---------------------------------------------------------------------------------|
  1026                     |                                                                                  |
   876                     |                                                                                  |
  1027                     |  HandleCommandComplete(videoMoveCommand, FAIL/SUCCESS)                           |
   877                     |  HandleCommandComplete(videoMoveCommand, KErrNone)                               |
       
   878                     |      videoDeleteCommand KVcxMediaMyVideosInt32Value contains KErrNone if everything went
       
   879                     |      OK. If value is != KErrNone, then something went wrong and command might    |
       
   880                     |      have ended prematurely                                                      |
  1028                     |<---------------------------------------------------------------------------------|
   881                     |<---------------------------------------------------------------------------------|
  1029                     
   882                     
  1030 
   883 
  1031 VIDEO DELETE MSC
   884 VIDEO DELETE MSC
  1032 ----------------
   885 ----------------
  1074                     |          Media array contains array of CMPXMedia objects which contain:          |
   927                     |          Media array contains array of CMPXMedia objects which contain:          |
  1075                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
   928                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
  1076                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
   929                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
  1077                     |<---------------------------------------------------------------------------------|
   930                     |<---------------------------------------------------------------------------------|
  1078                     |                                                                                  |
   931                     |                                                                                  |
  1079                     |  HandleCommandComplete(videoDeleteCommand, FAIL/SUCCESS)                         |
   932                     |  HandleCommandComplete(videoDeleteCommand, KErrNone)                             |
       
   933                     |      videoDeleteCommand KVcxMediaMyVideosInt32Value contains KErrNone if everything went
       
   934                     |      OK. If value is != KErrNone, then something went wrong and command was ended|
       
   935                     |      prematurely.                                                                |
  1080                     |<---------------------------------------------------------------------------------|
   936                     |<---------------------------------------------------------------------------------|
  1081                     
   937                     
  1082 
   938 
  1083 CANCEL VIDEO DELETE MSC
   939 CANCEL VIDEO DELETE MSC
  1084 -----------------------
   940 -----------------------
  1085 
   941 
  1086 
   942 
       
   943 
       
   944 ADD VIDEOS TO ALBUM MSC
       
   945 -----------------------
       
   946 Notice that adding items to album does not add videos from collection. Ie item added events
       
   947 will not arrive for this operation. Instead the modify event is sent for the album item which is
       
   948 affected.
       
   949                  .------.                                                                 .-------------------------.
       
   950                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   951                  '------'                                                                 '-------------------------'
       
   952                     |                                                                                  |
       
   953                     |                                                                                  |
       
   954 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
   955                                                                                                        |
       
   956 cmd (CMPXCommand type) contains:                                                                       |
       
   957     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   958     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosAddToAlbum                                     |
       
   959     KMPXCommandGeneralCollectionId = 0x20016B97                                                        |
       
   960     KMPXCommandGeneralDoSync       = EFalse                                                            |
       
   961     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
   962     KVcxMediaMyVideosUint32Value   = Album MDS ID (album where to add)                                 |
       
   963     KMPXMediaArrayContents         = Media array (CMPXMediaArray)                                      |
       
   964         Media array contains array of CMPXMedia objects which contain:                                 |
       
   965            KMPXMediaGeneralId = video MPX ID (video to add)                                            |           
       
   966                     |--------------------------------------------------------------------------------->|
       
   967                     |                                                                                  |
       
   968                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
   969                     |      cmd is the same as was given in .CommandL() call.                           |
       
   970                     |      cmd contains in addition to parameters set earlier:                         |
       
   971                     |         1. Media array has error codes set to each array item:                   |
       
   972                     |            KVcxMediaMyVideosInt32Value = KErrNone if successful,                 |
       
   973                     |             KErrGeneral or KErrAlreadyExists otherwise.                          |
       
   974                     |         2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
   975                     |            OK. If value is != KErrNone, then something went wrong and individual |
       
   976                     |            error codes for array items might not contain values.                 |
       
   977                     |<---------------------------------------------------------------------------------|
       
   978                     |                                                                                  |
       
   979                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
   980                     |                                                                                  |
       
   981                     |  aMessage contains:                                                              |
       
   982                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
   983                     |      KMPXMessageChangeEventType  = EMPXItemModified                              |
       
   984                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosVideoListOrderChanged             |
       
   985                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
   986                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the album which had videos added)
       
   987                     |<---------------------------------------------------------------------------------|
       
   988 
       
   989 
       
   990 REMOVE VIDEOS FROM ALBUM MSC
       
   991 ----------------------------
       
   992 
       
   993 Notice that removing items from album does not remove videos from collection. Ie item deleted events
       
   994 will not arrive for this operation. Instead the modify event is sent for the album item which is
       
   995 affected.
       
   996                  .------.                                                                 .-------------------------.
       
   997                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   998                  '------'                                                                 '-------------------------'
       
   999                     |                                                                                  |
       
  1000                     |                                                                                  |
       
  1001 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
  1002                                                                                                        |
       
  1003 cmd (CMPXCommand type) contains:                                                                       |
       
  1004     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
  1005     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosRemoveFromAlbum                                |
       
  1006     KMPXCommandGeneralCollectionId = 0x20016B97                                                        |
       
  1007     KMPXCommandGeneralDoSync       = EFalse                                                            |
       
  1008     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
  1009     KVcxMediaMyVideosUint32Value   = Album MDS ID (iId1 member of TMPXItemId, album where from to remove) 
       
  1010     KMPXMediaArrayContents         = Media array (CMPXMediaArray)                                      |
       
  1011         Media array contains array of CMPXMedia objects which contain:                                 |
       
  1012            KMPXMediaGeneralId = video MPX ID (video to remove)                                         |           
       
  1013                     |--------------------------------------------------------------------------------->|
       
  1014                     |                                                                                  |
       
  1015                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
  1016                     |      cmd is the same as was given in .CommandL() call.                           |
       
  1017                     |      cmd contains in addition to parameters set earlier:                         |
       
  1018                     |         1. Media array has error codes set to each array item:                   |
       
  1019                     |            KVcxMediaMyVideosInt32Value = KErrNone if successful, KErrGeneral otherwise.
       
  1020                     |         2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
  1021                     |            OK. If value is != KErrNone, then something went wrong and individual |
       
  1022                     |            error codes for array items might not contain values.                 |
       
  1023                     |<---------------------------------------------------------------------------------|
       
  1024                     |                                                                                  |
       
  1025                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
  1026                     |                                                                                  |
       
  1027                     |  aMessage contains:                                                              |
       
  1028                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
  1029                     |      KMPXMessageChangeEventType  = EMPXItemModified                              |
       
  1030                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosVideoListOrderChanged             |
       
  1031                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
  1032                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the album which had videos removed)
       
  1033                     |<---------------------------------------------------------------------------------|
       
  1034 
       
  1035 ADD ALBUM MSC
       
  1036 -------------
       
  1037 
       
  1038 Asynchronous version:
       
  1039 
       
  1040                  .------.                                                                 .-------------------------.
       
  1041                  |CLIENT|                                                                 |MPX My Videos Collection |
       
  1042                  '------'                                                                 '-------------------------'
       
  1043                     |                                                                                  |
       
  1044                     |                                                                                  |
       
  1045 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
  1046                                                                                                        |
       
  1047 cmd (CMPXCommand type) contains:                                                                       |
       
  1048     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
  1049     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosAddAlbum                                       |
       
  1050     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97)                         |
       
  1051     KMPXCommandGeneralDoSync       = EFalse                                                            |
       
  1052     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
  1053     KMPXMediaGeneralTitle          = Album title text                                                  |
       
  1054                     |--------------------------------------------------------------------------------->|
       
  1055                     |                                                                                  |
       
  1056                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
  1057                     |      cmd is the same as was given in .CommandL() call.                           |
       
  1058                     |      cmd contains in addition to parameters set earlier:                         |
       
  1059                     |         1. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
  1060                     |            OK. If value is != KErrNone, then something went wrong.               |
       
  1061                     |         2. KMPXMediaGeneralId contains the MPX ID of the new album.              |
       
  1062                     |<---------------------------------------------------------------------------------|
       
  1063                     |                                                                                  |
       
  1064                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
  1065                     |                                                                                  |
       
  1066                     |  aMessage contains:                                                              |
       
  1067                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
  1068                     |      KMPXMessageChangeEventType  = EMPXItemInserted                              |
       
  1069                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo                        |
       
  1070                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
  1071                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the new album)                  |
       
  1072                     |      KMPXCommandColAddMedia      = MPX media of the new album (CMPXMedia)        |
       
  1073                     |<---------------------------------------------------------------------------------|
       
  1074 
       
  1075 Synchronous version:
       
  1076 
       
  1077 CommandL leaves if error occurs.
       
  1078 
       
  1079                  .------.                                                                 .-------------------------.
       
  1080                  |CLIENT|                                                                 |MPX My Videos Collection |
       
  1081                  '------'                                                                 '-------------------------'
       
  1082                     |                                                                                  |
       
  1083                     |                                                                                  |
       
  1084 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
  1085                                                                                                        |
       
  1086 cmd (CMPXCommand type) contains:                                                                       |
       
  1087     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
  1088     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosAddAlbum                                       |
       
  1089     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97)                         |
       
  1090     KMPXCommandGeneralDoSync       = ETrue                                                             |
       
  1091     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
  1092     KMPXMediaGeneralTitle          = Album title text                                                  |
       
  1093                                                                                                        |
       
  1094     After the call KMPXMediaGeneralId attribute contains the MPX ID of the new album.                  |
       
  1095                     |--------------------------------------------------------------------------------->.
       
  1096                     |<---------------------------------------------------------------------------------'
       
  1097                     |                                                                                  |
       
  1098                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
  1099                     |                                                                                  |
       
  1100                     |  aMessage contains:                                                              |
       
  1101                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
  1102                     |      KMPXMessageChangeEventType  = EMPXItemInserted                              |
       
  1103                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo                        |
       
  1104                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
  1105                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the new album)                  |
       
  1106                     |      KMPXCommandColAddMedia      = MPX media of the new album (CMPXMedia)        |
       
  1107                     |<---------------------------------------------------------------------------------|
       
  1108 
       
  1109 
       
  1110 
       
  1111 REMOVE ALBUMS MSC
       
  1112 -----------------
       
  1113 
       
  1114                  .------.                                                                 .-------------------------.
       
  1115                  |CLIENT|                                                                 |MPX My Videos Collection |
       
  1116                  '------'                                                                 '-------------------------'
       
  1117                     |                                                                                  |
       
  1118                     |                                                                                  |
       
  1119 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
  1120                                                                                                        |
       
  1121 cmd (CMPXCommand type) contains:                                                                       |
       
  1122     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
  1123     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosRemoveAlbums                                   |
       
  1124     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97)                         |
       
  1125     KMPXCommandGeneralDoSync       = EFalse (only async supported)                                     |
       
  1126     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
  1127     KMPXMediaArrayContents         = Media array (CMPXMediaArray)                                      |
       
  1128         Media array contains array of CMPXMedia objects which contain:                                 |
       
  1129            KMPXMediaGeneralId = album MPX ID (album to remove)                                         |           
       
  1130                     |--------------------------------------------------------------------------------->|
       
  1131                     |                                                                                  |
       
  1132                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
  1133                     |      cmd is the same as was given in .CommandL() call.                           |
       
  1134                     |      cmd contains in addition to parameters set earlier:                         |
       
  1135                     |         1. Media array has error codes set to each array item:                   |
       
  1136                     |            KVcxMediaMyVideosInt32Value = KErrNone if successful, KErrGeneral otherwise.
       
  1137                     |         2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
  1138                     |            OK. If value is != KErrNone, then something went wrong and individual |
       
  1139                     |            error codes for array items might not contain values.                 |
       
  1140                     |<---------------------------------------------------------------------------------|
       
  1141                     |                                                                                  |
       
  1142                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
  1143                     |                                                                                  |
       
  1144                     |  aMessage contains:                                                              |
       
  1145                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
  1146                     |      KMPXMessageChangeEventType  = EMPXItemDeleted                               |
       
  1147                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo                        |
       
  1148                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
  1149                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the album which was removed)    |
       
  1150                     |<---------------------------------------------------------------------------------|
       
  1151 
  1087 */
  1152 */
  1088 
  1153 
  1089 #endif // VCXMYVIDEOSDEFS_H
  1154 #endif // VCXMYVIDEOSDEFS_H
  1090 
  1155