videoutils_plat/videoplayer_constants_api/inc/vcxmyvideosdefs.h
changeset 16 ae43a6765dd5
parent 2 12f9acf7a934
child 18 2c61986c60fa
equal deleted inserted replaced
15:6c92a12abac0 16:ae43a6765dd5
     1 /*
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8 *
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    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 //These are written to TMPXItemId::iId2
       
    30 const TInt KVcxMvcMediaTypeVideo    = 0;
       
    31 const TInt KVcxMvcMediaTypeCategory = 1;
       
    32 const TInt KVcxMvcMediaTypeAlbum    = 2;
       
    33 
    29 /**
    34 /**
    30 * My Videos Collection category IDs.
    35 * My Videos Collection category IDs.
    31 * MPX ID has this as iId1 member and 1 as iId2.
    36 * TMPXItemId has these as iId1 member and KVcxMvcMediaTypeCategory as iId2.
    32 * These are same as indexes in path.
       
    33 */
    37 */
    34 const TInt KVcxMvcCategoryIdAll          = 0;
    38 const TInt KVcxMvcCategoryIdAll          = 0;
    35 const TInt KVcxMvcCategoryIdDownloads    = 1;
    39 const TInt KVcxMvcCategoryIdDownloads    = 1;
    36 const TInt KVcxMvcCategoryIdTvRecordings = 2;
    40 const TInt KVcxMvcCategoryIdTvRecordings = 2;
    37 const TInt KVcxMvcCategoryIdCaptured     = 3;
    41 const TInt KVcxMvcCategoryIdCaptured     = 3;
   457  */
   461  */
   458 const TMPXAttributeData KVcxMediaMyVideosInt32Value = {KVcxMediaIdMyVideos, 1 << 22};
   462 const TMPXAttributeData KVcxMediaMyVideosInt32Value = {KVcxMediaIdMyVideos, 1 << 22};
   459 
   463 
   460 /**
   464 /**
   461  * 35.
   465  * 35.
       
   466  * TUint32, general parameter, the usage depends on context.
       
   467  * Not saved to MDS
       
   468  */
       
   469 const TMPXAttributeData KVcxMediaMyVideosUint32Value = {KVcxMediaIdMyVideos, 1 << 23};
       
   470 
       
   471 /**
       
   472  * 36.
   462  * TUint32, transaction ID, client sets this field when making asynchronous request.
   473  * TUint32, transaction ID, client sets this field when making asynchronous request.
   463  * Collection sets the same ID to response messages. Client can use this to pair
   474  * Collection sets the same ID to response messages. Client can use this to pair
   464  * requests and responses.
   475  * requests and responses.
   465  * Not saved to MDS
   476  * Not saved to MDS
   466  */
   477  */
   467 const TMPXAttributeData KVcxMediaMyVideosTransactionId = {KVcxMediaIdMyVideos, 1 << 23};
   478 const TMPXAttributeData KVcxMediaMyVideosTransactionId = {KVcxMediaIdMyVideos, 1 << 24};
   468 
       
   469 
   479 
   470 
   480 
   471 // -------- end of my videos media attributes -------- //
   481 // -------- end of my videos media attributes -------- //
   472 
   482 
   473 /*
   483 /*
   488 const TInt KVcxCommandMyVideosGetMediaFullDetailsByMpxId = 4; //async
   498 const TInt KVcxCommandMyVideosGetMediaFullDetailsByMpxId = 4; //async
   489 const TInt KVcxCommandMyVideosGetMediasByMpxId           = 5; //async
   499 const TInt KVcxCommandMyVideosGetMediasByMpxId           = 5; //async
   490 const TInt KVcxCommandMyVideosMove                       = 6; //async
   500 const TInt KVcxCommandMyVideosMove                       = 6; //async
   491 const TInt KVcxCommandMyVideosCopy                       = 7; //async
   501 const TInt KVcxCommandMyVideosCopy                       = 7; //async
   492 const TInt KVcxCommandMyVideosDelete                     = 8; //async
   502 const TInt KVcxCommandMyVideosDelete                     = 8; //async
       
   503 const TInt KVcxCommandMyVideosAddToAlbum                 = 9; //async
       
   504 const TInt KVcxCommandMyVideosRemoveFromAlbum            = 10; //async
       
   505 const TInt KVcxCommandMyVideosAddAlbum                   = 11; //async & sync
       
   506 const TInt KVcxCommandMyVideosRemoveAlbums               = 12; //async
   493 
   507 
   494 /** This command cancels the move or copy operation only if it
   508 /** This command cancels the move or copy operation only if it
   495  *  is allready being processed by the collection plugin. If the
   509  *  is allready being processed by the collection plugin. If the
   496  *  command is still in queue, this cancel has no effect.
   510  *  command is still in queue, this cancel has no effect.
   497  *  If Move or Copy operations were not in progress the command
   511  *  If Move or Copy operations were not in progress the command
   498  *  leaves with KErrNotFound.
   512  *  leaves with KErrNotFound.
   499  */
   513  */
   500 const TInt KVcxCommandMyVideosCancelMoveOrCopy = 9; //sync
   514 const TInt KVcxCommandMyVideosCancelMoveOrCopy = 13; //sync
   501 
   515 
   502 /** This command cancels the delete operation only if it
   516 /** This command cancels the delete operation only if it
   503  *  is allready being processed by the collection plugin. If the
   517  *  is allready being processed by the collection plugin. If the
   504  *  command is still in queue, this cancel has no effect.
   518  *  command is still in queue, this cancel has no effect.
   505  *  If delete operation was not in progress the command
   519  *  If delete operation was not in progress the command
   506  *  leaves with KErrNotFound.
   520  *  leaves with KErrNotFound.
   507  */
   521  */
   508 const TInt KVcxCommandMyVideosCancelDelete = 10; //sync
   522 const TInt KVcxCommandMyVideosCancelDelete = 14; //sync
   509 
   523 
   510 const TInt KVcxMessageMyVideosGetMediasByMpxIdResp = 11;
   524 const TInt KVcxMessageMyVideosGetMediasByMpxIdResp = 15;
   511 
   525 
   512 /**
   526 /**
   513 * Collection sends this message when new items are added
   527 * Collection sends this message when new items are added
   514 * to the end of the collection plugins cache. If client has not yet received
   528 * to the end of the collection plugins cache. If client has not yet received
   515 * KVcxMessageMyVideosListComplete event, then the media list received with
   529 * KVcxMessageMyVideosListComplete event, then the media list received with
   518 * call to keep collection frameworks path variable updated.
   532 * call to keep collection frameworks path variable updated.
   519 * KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events
   533 * KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events
   520 * are broadcasted to all clients. So they might appear even when client hasn't
   534 * are broadcasted to all clients. So they might appear even when client hasn't
   521 * done OpenL.
   535 * done OpenL.
   522 */
   536 */
   523 const TInt KVcxMessageMyVideosItemsAppended = 12; //event
   537 const TInt KVcxMessageMyVideosItemsAppended = 16; //event
   524 
   538 
   525 /**
   539 /**
   526 * Collection sends this message when media list fetching has ended
   540 * Collection sends this message when media list fetching has ended
   527 * and no more KVcxMessageMyVideosItemsAppended events will be sent.
   541 * and no more KVcxMessageMyVideosItemsAppended events will be sent.
   528 * Collection also cuts off the shared memory connection to video lists
   542 * Collection also cuts off the shared memory connection to video lists
   529 * between clients and collection. Ie, if new KVcxMessageMyVideosItemsAppended
   543 * between clients and collection. Ie, if new KVcxMessageMyVideosItemsAppended
   530 * events arrive after this event, the client knows that they are not automatically
   544 * events arrive after this event, the client knows that they are not automatically
   531 * in the list it had received earlier (unless client itself initiated the new fetching
   545 * in the list it had received earlier (unless client itself initiated the new fetching
   532 * by calling OpenL().
   546 * by calling OpenL().
   533 */
   547 */
   534 const TInt KVcxMessageMyVideosListComplete = 13; //event
   548 const TInt KVcxMessageMyVideosListComplete = 17; //event
   535 
   549 
   536 /* Collection sends this message when it starts processing
   550 /* Collection sends this message when it starts processing
   537  * Move Or Copy command. When this event is received,
   551  * Move Or Copy command. When this event is received,
   538  * KVcxCommandMyVideosCancelMoveOrCopy can be sent. 
   552  * KVcxCommandMyVideosCancelMoveOrCopy can be sent. 
   539  */
   553  */
   540 const TInt KVcxMessageMyVideosMoveOrCopyStarted = 14; //event
   554 const TInt KVcxMessageMyVideosMoveOrCopyStarted = 18; //event
   541 
   555 
   542 /* Collection sends this message when it starts processing
   556 /* Collection sends this message when it starts processing
   543  * KVcxCommandMyVideosDelete command. After this event is received,
   557  * KVcxCommandMyVideosDelete command. After this event is received,
   544  * KVcxCommandMyVideosCancelDelete can be sent. 
   558  * KVcxCommandMyVideosCancelDelete can be sent. 
   545  */
   559  */
   546 const TInt KVcxMessageMyVideosDeleteStarted = 15; //event
   560 const TInt KVcxMessageMyVideosDeleteStarted = 19; //event
   547 
   561 
   548 /* End events for Move/Copy/Delete operations. The response contains
   562 /* End events for Move/Copy/Delete operations. The response contains
   549  * MDS ID and error codes for each item.
   563  * MDS ID and error codes for each item.
   550  */
   564  */
   551 const TInt KVcxMessageMyVideosMoveResp   = 16; //event 
   565 const TInt KVcxMessageMyVideosMoveResp   = 20; //event 
   552 const TInt KVcxMessageMyVideosCopyResp   = 17; //event
   566 const TInt KVcxMessageMyVideosCopyResp   = 21; //event
   553 const TInt KVcxMessageMyVideosDeleteResp = 18; //event
   567 const TInt KVcxMessageMyVideosDeleteResp = 22; //event
   554 
   568 
   555 /**
   569 /**
   556 * Indicates that media array variable contains other messages.
   570 * Indicates that media array variable contains other messages.
   557 * This message is only sent as the highest level item in the message tree.
   571 * This message is only sent as the highest level item in the message tree.
   558 */
   572 */
   559 const TInt KVcxMessageMyVideosMessageArray = 19;
   573 const TInt KVcxMessageMyVideosMessageArray = 23;
   560 
   574 
   561 /*
   575 /*
   562  OpenL() (video list) MSC
   576  OpenL() (video list) MSC
   563  ------------------------
   577  ------------------------
   564  Opening the collection is quite complicated due the fact that it allows multiple clients to open
   578  Opening the collection is quite complicated due the fact that it allows multiple clients to open
   565  video list at the same time. The scenario described below involves video list fetching from MDS. If the collection
   579  video list at the same time. The scenario described below involves video list fetching from MDS. If the collection
   566  has the video list already fetched, then the HandleOpenL will contain all videos and KVcxMessageMyVideosListComplete
   580  has the video list already fetched, then the HandleOpenL will contain all videos and KVcxMessageMyVideosListComplete
   567  is received immedetially.
   581  is received immedetially.
   568  
   582   
   569  KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events concern only video lists.
       
   570  Category level always returns all categories at HandleOpenL.
       
   571  
       
   572                  .------.                                                                 .-------------------------.
   583                  .------.                                                                 .-------------------------.
   573                  |CLIENT|                                                                 |MPX My Videos Collection |
   584                  |CLIENT|                                                                 |MPX My Videos Collection |
   574                  '------'                                                                 '-------------------------'
   585                  '------'                                                                 '-------------------------'
   575                     |                                                                                  |
   586                     |                                                                                  |
   576                     |                                                                                  |
   587                     |                                                                                  |
   611                     |  after this point (without client doing OpenL()), it means that someone else     |
   622                     |  after this point (without client doing OpenL()), it means that someone else     |
   612                     |  changed sorting order and started fetching new video list.                      |
   623                     |  changed sorting order and started fetching new video list.                      |
   613                     |  In that case this client should also fetch new list by calling OpenL().         |
   624                     |  In that case this client should also fetch new list by calling OpenL().         |
   614                     |<---------------------------------------------------------------------------------|
   625                     |<---------------------------------------------------------------------------------|
   615                     |                                                                                  |
   626                     |                                                                                  |
   616                     |                                                                                  |
       
   617 
       
   618 
       
   619  DOWNLOAD START MSC
       
   620  ------------------
       
   621  
       
   622  In future download request parameters can be made to contain media array of download parameters,
       
   623  allowing multiple downloads. Currently it is not supported.
       
   624  
       
   625                  .------.                                                                 .-------------------------.
       
   626                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   627                  '------'                                                                 '-------------------------'
       
   628                     |                                                                                  |
       
   629                     |                                                                                  |
       
   630 iCollectionUtility->Collection().CommandL( *downloadStartCommand )                                     |
       
   631                                                                                                        |
       
   632 downloadStartCommand (CMPXCommand type) contains:                                                      |
       
   633     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   634     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosStartDownload                                  |
       
   635     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   636     KMPXCommandColAddMedia         = Download request parameters (CMPXMedia type)                      |
       
   637         Download request parameters CMPXMedia type) contains:                                          |
       
   638             KVcxMediaMyVideosIapId     = IAP ID                                                        |
       
   639             KVcxMediaMyVideosUsername  = User name                                                     |
       
   640             KVcxMediaMyVideosPassword  = Password                                                      |
       
   641             KMPXMediaGeneralFlags      = EVcxMyVideosServiceHasReadOnlyIap|EVcxMyVideosSilent          |
       
   642             KVcxMediaMyVideosRemoteUrl = Remote URL                                                    |
       
   643             KMPXMediaGeneralTitle      = Video title                                                   |
       
   644                     |--------------------------------------------------------------------------------->|
       
   645                     |                                                                                  |
       
   646                     |                                                                                  |
       
   647                     |  HandleCommandComplete(downloadStartCommand, FAIL/SUCCESS)                       |
       
   648                     |<---------------------------------------------------------------------------------|
       
   649                     |                                                                                  |
       
   650                     |                                                                                  |
       
   651                     |                                                                                  |
       
   652                     |  HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                   |
       
   653                     |                                                                                  |
       
   654                     |  aMessage contains:                                                              |
       
   655                     |      KMPXMessageGeneralId       = KMPXMessageIdItemChanged                       |
       
   656                     |      KMPXMessageChangeEventType = EMPXItemInserted                               |
       
   657                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
       
   658                     |      KMPXMessageMediaGeneralId  = MPX ID                                         |
       
   659                     |                                                                                  |
       
   660                     |  The corresponding media object contains:                                        |
       
   661                     |      KMPXMediaGeneralId         = MPX ID                                         |
       
   662                     |      KMPXMediaGeneralUri        = Local file path                                |
       
   663                     |      KVcxMediaMyVideosRemoteUrl = Remote URL                                     |
       
   664                     |<---------------------------------------------------------------------------------|
       
   665                     |                                                                                  |
       
   666                     |                                                                                  |
       
   667                     |                                                                                  |
       
   668                     |                                                                                  |
       
   669                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
   670                     |                                                                                  |
       
   671                     |  aMessage contains:                                                              |
       
   672                     |      KMPXMessageGeneralId       = KMPXMessageIdItemChanged                       |
       
   673                     |      KMPXMessageChangeEventType = EMPXItemModified                               |
       
   674                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
       
   675                     |     KMPXMessageMediaGeneralId   = MPX ID                                         |
       
   676                     |                                                                                  |
       
   677                     | The corresponding media object contains:                                         |
       
   678                     |      KMPXMediaGeneralId             = MPX ID                                 |
       
   679                     |      KVcxMediaMyVideosDownloadState = Download state                             |
       
   680                     |      KVcxMediaMyVideosDownloadId    = Download ID                                |
       
   681                     |<---------------------------------------------------------------------------------|
       
   682                     |                                                                                  |
       
   683                     |                                                                                  |
       
   684 
       
   685 
       
   686 
       
   687 DOWNLOAD CANCEL MSC
       
   688 -------------------
       
   689  
       
   690                  .------.                                                                 .-------------------------.
       
   691                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   692                  '------'                                                                 '-------------------------'
       
   693                     |                                                                                  |
       
   694                     |                                                                                  |
       
   695 iCollectionUtility->Collection().CommandL( *cancelDownloadCommand )                                    |
       
   696                                                                                                        |
       
   697 cancelDownloadCommand (CMPXCommand type) contains:                                                     |
       
   698     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   699     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosCancelDownload                                 |
       
   700     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   701     KMPXCommandColAddMedia         = Cancel download request parameters (CMPXMedia type)               |
       
   702         Cancel download request parameters (CMPXMedia type) contains:                                  |
       
   703         KMPXMediaGeneralId          = MPX ID                                                           |
       
   704         KVcxMediaMyVideosDownloadId = download ID                                                      |
       
   705         KMPXMediaGeneralUri         = file path                                                        |                                        
       
   706                     |--------------------------------------------------------------------------------->|
       
   707                     |                                                                                  |
       
   708                     |                                                                                  |
       
   709                     |   HandleCommandComplete(cancelDownloadCommand, TInt aError )                     |
       
   710                     |      aError is != KErrNone if either dl object (in Download Manager), file or    |
       
   711                     |      MPX object was left to system.                                              |
       
   712                     |<---------------------------------------------------------------------------------|
       
   713                     |                                                                                  |
       
   714                     |                                                                                  |
       
   715                     |                                                                                  |
       
   716                     |   HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                  |
       
   717                     |                                                                                  |
       
   718                     |   aMessage contains:                                                             |
       
   719                     |       KMPXMessageGeneralId       = KMPXMessageIdItemChanged                      |
       
   720                     |       KMPXMessageChangeEventType = EMPXItemDeleted                               |
       
   721                     |       KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                  |
       
   722                     |       KMPXMessageMediaGeneralId  = MPX ID                                        |
       
   723                     |                                                                                  |
       
   724                     |       The corresponding media object is gone                                     |
       
   725                     |<---------------------------------------------------------------------------------|
       
   726                     |                                                                                  |
   627                     |                                                                                  |
   727 
   628 
   728 
   629 
   729 GET MEDIA FULL DETAILS BY MPX ID MSC
   630 GET MEDIA FULL DETAILS BY MPX ID MSC
   730 ------------------------------------
   631 ------------------------------------
   759 
   660 
   760 GET MEDIAS BY MPX ID MSC
   661 GET MEDIAS BY MPX ID MSC
   761 ------------------------
   662 ------------------------
   762 
   663 
   763  This command loads requested MDS items to MPX My Videos collection cache and returns the requested
   664  This command loads requested MDS items to MPX My Videos collection cache and returns the requested
   764  items to the client ( subset of the cache ).
   665  items to the client ( subset of the cache ). Notice that if this command is given while OpenL is
       
   666  being processed, then OpenL is interrupted and started from scratch when this command finishes.
   765  
   667  
   766                  .------.                                                                 .-------------------------.
   668                  .------.                                                                 .-------------------------.
   767                  |CLIENT|                                                                 |MPX My Videos Collection |
   669                  |CLIENT|                                                                 |MPX My Videos Collection |
   768                  '------'                                                                 '-------------------------'
   670                  '------'                                                                 '-------------------------'
   769                     |                                                                                  |
   671                     |                                                                                  |
   793                     |      KMPXMediaArrayContents     = Media array (CMPXMediaArray)                   |
   695                     |      KMPXMediaArrayContents     = Media array (CMPXMediaArray)                   |
   794                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
   696                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
   795                     |<---------------------------------------------------------------------------------|
   697                     |<---------------------------------------------------------------------------------|
   796                     |                                                                                  |                 
   698                     |                                                                                  |                 
   797 
   699 
   798 DOWNLOAD PAUSE MSC
       
   799 -------------------
       
   800  
       
   801                  .------.                                                                 .-------------------------.
       
   802                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   803                  '------'                                                                 '-------------------------'
       
   804                     |                                                                                  |
       
   805                     |                                                                                  |
       
   806 iCollectionUtility->Collection().CommandL( *pauseDownloadCommand )                                     |
       
   807                                                                                                        |
       
   808 cancelDownloadCommand (CMPXCommand type) contains:                                                     |
       
   809     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   810     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosPauseDownload                                  |
       
   811     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   812     KVcxMediaMyVideosDownloadId    = download id                                                       |
       
   813                     |--------------------------------------------------------------------------------->|
       
   814                     |                                                                                  |
       
   815                     |                                                                                  |
       
   816                     |   HandleCommandComplete(pauseDownloadCommand, FAIL/SUCCESS)                      |
       
   817                     |<---------------------------------------------------------------------------------|
       
   818                     |                                                                                  |
       
   819                     |                                                                                  |
       
   820                     |                                                                                  |
       
   821                     |   HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                  |
       
   822                     |                                                                                  |
       
   823                     |   aMessage contains:                                                             |
       
   824                     |       KMPXMessageGeneralId       = KMPXMessageIdItemChanged                      |
       
   825                     |       KMPXMessageChangeEventType = EMPXItemModified                              |
       
   826                     |       KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                  |
       
   827                     |       KMPXMessageMediaGeneralId  = MPX ID                                        |
       
   828                     |<---------------------------------------------------------------------------------|
       
   829                     |                                                                                  |
       
   830 
       
   831 DOWNLOAD RESUME MSC
       
   832 -------------------
       
   833  
       
   834                  .------.                                                                 .-------------------------.
       
   835                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   836                  '------'                                                                 '-------------------------'
       
   837                     |                                                                                  |
       
   838                     |                                                                                  |
       
   839 iCollectionUtility->Collection().CommandL( *downloadStartCommand )                                     |
       
   840                                                                                                        |
       
   841 downloadStartCommand (CMPXCommand type) contains:                                                      |
       
   842     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   843     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosStartDownload                                  |
       
   844     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection                                      |
       
   845     KMPXCommandColAddMedia         = Download request parameters (CMPXMedia type)                      |
       
   846         Download request parameters (CMPXMedia type) contains:                                         |
       
   847             KVcxMediaMyVideosIapId      = IAP ID                                                       |
       
   848             KVcxMediaMyVideosUsername   = User name                                                    |
       
   849             KVcxMediaMyVideosPassword   = Password                                                     |
       
   850             KMPXMediaGeneralFlags       = EVcxMyVideosServiceHasReadOnlyIap|EVcxMyVideosSilent         |
       
   851             KVcxMediaMyVideosDownloadId = Download ID                                                  |
       
   852                     |--------------------------------------------------------------------------------->|
       
   853                     |                                                                                  |
       
   854                     |                                                                                  |
       
   855                     |  HandleCommandComplete(downloadStartCommand, FAIL/SUCCESS)                       |
       
   856                     |<---------------------------------------------------------------------------------|
       
   857                     |                                                                                  |
       
   858                     |                                                                                  |
       
   859                     |                                                                                  |
       
   860                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
   861                     |                                                                                  |
       
   862                     |  aMessage contains:                                                              |
       
   863                     |      KMPXMessageGeneralId       = KMPXMessageIdItemChanged                       |
       
   864                     |      KMPXMessageChangeEventType = EMPXItemModified                               |
       
   865                     |      KMPXMessageCollectionId    = KVcxUidMyVideosMpxCollection                   |
       
   866                     |      KMPXMessageMediaGeneralId  = MPX ID                                         |
       
   867                     |                                                                                  |
       
   868                     | The corresponding media object contains:                                         |
       
   869                     |      KMPXMediaGeneralId             = MPX ID                                     |
       
   870                     |      KVcxMediaMyVideosDownloadState = Download state                             |
       
   871                     |      KVcxMediaMyVideosDownloadId    = Download ID                                |
       
   872                     |<---------------------------------------------------------------------------------|
       
   873                     |                                                                                  |
       
   874                     |                                                                                  |
       
   875 
   700 
   876 VIDEO ADD MSC
   701 VIDEO ADD MSC
   877 -------------
   702 -------------
   878 
   703 
   879 Currently only synchronous version is supported. Only one item can be added per call. This is currently
   704 Currently only synchronous version is supported. Only one item can be added per call. This is currently
   998                     |          Media array contains array of CMPXMedia objects which contain:          |
   823                     |          Media array contains array of CMPXMedia objects which contain:          |
   999                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
   824                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
  1000                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
   825                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
  1001                     |<---------------------------------------------------------------------------------|
   826                     |<---------------------------------------------------------------------------------|
  1002                     |                                                                                  |
   827                     |                                                                                  |
  1003                     |  HandleCommandComplete(videoMoveCommand, FAIL/SUCCESS)                           |
   828                     |  HandleCommandComplete(videoMoveCommand, KErrNone)                               |
       
   829                     |      videoDeleteCommand KVcxMediaMyVideosInt32Value contains KErrNone if everything went
       
   830                     |      OK. If value is != KErrNone, then something went wrong and command might    |
       
   831                     |      have ended prematurely                                                      |
  1004                     |<---------------------------------------------------------------------------------|
   832                     |<---------------------------------------------------------------------------------|
  1005                     
   833                     
  1006 
   834 
  1007 VIDEO DELETE MSC
   835 VIDEO DELETE MSC
  1008 ----------------
   836 ----------------
  1050                     |          Media array contains array of CMPXMedia objects which contain:          |
   878                     |          Media array contains array of CMPXMedia objects which contain:          |
  1051                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
   879                     |          KMPXMessageMediaGeneralId   = MPX ID                                    |
  1052                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
   880                     |          KVcxMediaMyVideosInt32Value = result (system wide error code)           |
  1053                     |<---------------------------------------------------------------------------------|
   881                     |<---------------------------------------------------------------------------------|
  1054                     |                                                                                  |
   882                     |                                                                                  |
  1055                     |  HandleCommandComplete(videoDeleteCommand, FAIL/SUCCESS)                         |
   883                     |  HandleCommandComplete(videoDeleteCommand, KErrNone)                             |
       
   884                     |      videoDeleteCommand KVcxMediaMyVideosInt32Value contains KErrNone if everything went
       
   885                     |      OK. If value is != KErrNone, then something went wrong and command was ended|
       
   886                     |      prematurely.                                                                |
  1056                     |<---------------------------------------------------------------------------------|
   887                     |<---------------------------------------------------------------------------------|
  1057                     
   888                     
  1058 
   889 
  1059 CANCEL VIDEO DELETE MSC
   890 CANCEL VIDEO DELETE MSC
  1060 -----------------------
   891 -----------------------
  1061 
   892 
  1062 
   893 
       
   894 
       
   895 ADD VIDEOS TO ALBUM MSC
       
   896 -----------------------
       
   897 Notice that adding items to album does not add videos from collection. Ie item added events
       
   898 will not arrive for this operation. Instead the modify event is sent for the album item which is
       
   899 affected.
       
   900                  .------.                                                                 .-------------------------.
       
   901                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   902                  '------'                                                                 '-------------------------'
       
   903                     |                                                                                  |
       
   904                     |                                                                                  |
       
   905 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
   906                                                                                                        |
       
   907 cmd (CMPXCommand type) contains:                                                                       |
       
   908     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   909     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosAddToAlbum                                     |
       
   910     KMPXCommandGeneralCollectionId = 0x20016B97                                                        |
       
   911     KMPXCommandGeneralDoSync       = EFalse                                                            |
       
   912     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
   913     KVcxMediaMyVideosUint32Value   = Album MDS ID (album where to add)                                 |
       
   914     KMPXMediaArrayContents         = Media array (CMPXMediaArray)                                      |
       
   915         Media array contains array of CMPXMedia objects which contain:                                 |
       
   916            KMPXMediaGeneralId = video MPX ID (video to add)                                            |           
       
   917                     |--------------------------------------------------------------------------------->|
       
   918                     |                                                                                  |
       
   919                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
   920                     |      cmd is the same as was given in .CommandL() call.                           |
       
   921                     |      cmd contains in addition to parameters set earlier:                         |
       
   922                     |         1. Media array has error codes set to each array item:                   |
       
   923                     |            KVcxMediaMyVideosInt32Value = KErrNone if successful, KErrGeneral otherwise.
       
   924                     |         2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
   925                     |            OK. If value is != KErrNone, then something went wrong and individual |
       
   926                     |            error codes for array items might not contain values.                 |
       
   927                     |<---------------------------------------------------------------------------------|
       
   928                     |                                                                                  |
       
   929                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
   930                     |                                                                                  |
       
   931                     |  aMessage contains:                                                              |
       
   932                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
   933                     |      KMPXMessageChangeEventType  = EMPXItemModified                              |
       
   934                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosVideoListOrderChanged             |
       
   935                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
   936                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the album which had videos added)
       
   937                     |<---------------------------------------------------------------------------------|
       
   938 
       
   939 
       
   940 REMOVE VIDEOS FROM ALBUM MSC
       
   941 ----------------------------
       
   942 
       
   943 Notice that removing items from album does not remove videos from collection. Ie item deleted events
       
   944 will not arrive for this operation. Instead the modify event is sent for the album item which is
       
   945 affected.
       
   946                  .------.                                                                 .-------------------------.
       
   947                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   948                  '------'                                                                 '-------------------------'
       
   949                     |                                                                                  |
       
   950                     |                                                                                  |
       
   951 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
   952                                                                                                        |
       
   953 cmd (CMPXCommand type) contains:                                                                       |
       
   954     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   955     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosRemoveFromAlbum                                |
       
   956     KMPXCommandGeneralCollectionId = 0x20016B97                                                        |
       
   957     KMPXCommandGeneralDoSync       = EFalse                                                            |
       
   958     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
   959     KVcxMediaMyVideosUint32Value   = Album MDS ID (iId1 member of TMPXItemId, album where from to remove) 
       
   960     KMPXMediaArrayContents         = Media array (CMPXMediaArray)                                      |
       
   961         Media array contains array of CMPXMedia objects which contain:                                 |
       
   962            KMPXMediaGeneralId = video MPX ID (video to remove)                                         |           
       
   963                     |--------------------------------------------------------------------------------->|
       
   964                     |                                                                                  |
       
   965                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
   966                     |      cmd is the same as was given in .CommandL() call.                           |
       
   967                     |      cmd contains in addition to parameters set earlier:                         |
       
   968                     |         1. Media array has error codes set to each array item:                   |
       
   969                     |            KVcxMediaMyVideosInt32Value = KErrNone if successful, KErrGeneral otherwise.
       
   970                     |         2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
   971                     |            OK. If value is != KErrNone, then something went wrong and individual |
       
   972                     |            error codes for array items might not contain values.                 |
       
   973                     |<---------------------------------------------------------------------------------|
       
   974                     |                                                                                  |
       
   975                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
   976                     |                                                                                  |
       
   977                     |  aMessage contains:                                                              |
       
   978                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
   979                     |      KMPXMessageChangeEventType  = EMPXItemModified                              |
       
   980                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosVideoListOrderChanged             |
       
   981                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
   982                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the album which had videos removed)
       
   983                     |<---------------------------------------------------------------------------------|
       
   984 
       
   985 ADD ALBUM MSC
       
   986 -------------
       
   987 
       
   988 Asynchronous version:
       
   989 
       
   990                  .------.                                                                 .-------------------------.
       
   991                  |CLIENT|                                                                 |MPX My Videos Collection |
       
   992                  '------'                                                                 '-------------------------'
       
   993                     |                                                                                  |
       
   994                     |                                                                                  |
       
   995 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
   996                                                                                                        |
       
   997 cmd (CMPXCommand type) contains:                                                                       |
       
   998     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
   999     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosAddAlbum                                       |
       
  1000     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97)                         |
       
  1001     KMPXCommandGeneralDoSync       = EFalse                                                            |
       
  1002     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
  1003     KMPXMediaGeneralTitle          = Album title text                                                  |
       
  1004                     |--------------------------------------------------------------------------------->|
       
  1005                     |                                                                                  |
       
  1006                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
  1007                     |      cmd is the same as was given in .CommandL() call.                           |
       
  1008                     |      cmd contains in addition to parameters set earlier:                         |
       
  1009                     |         1. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
  1010                     |            OK. If value is != KErrNone, then something went wrong.               |
       
  1011                     |         2. KMPXMediaGeneralId contains the MPX ID of the new album.              |
       
  1012                     |<---------------------------------------------------------------------------------|
       
  1013                     |                                                                                  |
       
  1014                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
  1015                     |                                                                                  |
       
  1016                     |  aMessage contains:                                                              |
       
  1017                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
  1018                     |      KMPXMessageChangeEventType  = EMPXItemInserted                              |
       
  1019                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo                        |
       
  1020                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
  1021                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the new album)                  |
       
  1022                     |      KMPXCommandColAddMedia      = MPX media of the new album (CMPXMedia)        |
       
  1023                     |<---------------------------------------------------------------------------------|
       
  1024 
       
  1025 Synchronous version:
       
  1026 
       
  1027 CommandL leaves if error occurs.
       
  1028 
       
  1029                  .------.                                                                 .-------------------------.
       
  1030                  |CLIENT|                                                                 |MPX My Videos Collection |
       
  1031                  '------'                                                                 '-------------------------'
       
  1032                     |                                                                                  |
       
  1033                     |                                                                                  |
       
  1034 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
  1035                                                                                                        |
       
  1036 cmd (CMPXCommand type) contains:                                                                       |
       
  1037     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
  1038     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosAddAlbum                                       |
       
  1039     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97)                         |
       
  1040     KMPXCommandGeneralDoSync       = ETrue                                                             |
       
  1041     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
  1042     KMPXMediaGeneralTitle          = Album title text                                                  |
       
  1043                                                                                                        |
       
  1044     After the call KMPXMediaGeneralId attribute contains the MPX ID of the new album.                  |
       
  1045                     |--------------------------------------------------------------------------------->.
       
  1046                     |<---------------------------------------------------------------------------------'
       
  1047                     |                                                                                  |
       
  1048                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
  1049                     |                                                                                  |
       
  1050                     |  aMessage contains:                                                              |
       
  1051                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
  1052                     |      KMPXMessageChangeEventType  = EMPXItemInserted                              |
       
  1053                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo                        |
       
  1054                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
  1055                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the new album)                  |
       
  1056                     |      KMPXCommandColAddMedia      = MPX media of the new album (CMPXMedia)        |
       
  1057                     |<---------------------------------------------------------------------------------|
       
  1058 
       
  1059 
       
  1060 
       
  1061 REMOVE ALBUMS MSC
       
  1062 -----------------
       
  1063 
       
  1064                  .------.                                                                 .-------------------------.
       
  1065                  |CLIENT|                                                                 |MPX My Videos Collection |
       
  1066                  '------'                                                                 '-------------------------'
       
  1067                     |                                                                                  |
       
  1068                     |                                                                                  |
       
  1069 iCollectionUtility->Collection().CommandL( *cmd )                                                      |
       
  1070                                                                                                        |
       
  1071 cmd (CMPXCommand type) contains:                                                                       |
       
  1072     KMPXCommandGeneralId           = KVcxCommandIdMyVideos                                             |
       
  1073     KVcxMediaMyVideosCommandId     = KVcxCommandMyVideosRemoveAlbums                                   |
       
  1074     KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97)                         |
       
  1075     KMPXCommandGeneralDoSync       = EFalse (only async supported)                                     |
       
  1076     KVcxMediaMyVideosTransactionId = TR ID                                                             |
       
  1077     KMPXMediaArrayContents         = Media array (CMPXMediaArray)                                      |
       
  1078         Media array contains array of CMPXMedia objects which contain:                                 |
       
  1079            KMPXMediaGeneralId = album MPX ID (album to remove)                                         |           
       
  1080                     |--------------------------------------------------------------------------------->|
       
  1081                     |                                                                                  |
       
  1082                     |  HandleCommandComplete(cmd, KErrNone)                                            |
       
  1083                     |      cmd is the same as was given in .CommandL() call.                           |
       
  1084                     |      cmd contains in addition to parameters set earlier:                         |
       
  1085                     |         1. Media array has error codes set to each array item:                   |
       
  1086                     |            KVcxMediaMyVideosInt32Value = KErrNone if successful, KErrGeneral otherwise.
       
  1087                     |         2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went  |
       
  1088                     |            OK. If value is != KErrNone, then something went wrong and individual |
       
  1089                     |            error codes for array items might not contain values.                 |
       
  1090                     |<---------------------------------------------------------------------------------|
       
  1091                     |                                                                                  |
       
  1092                     | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError )                    |
       
  1093                     |                                                                                  |
       
  1094                     |  aMessage contains:                                                              |
       
  1095                     |      KMPXMessageGeneralId        = KMPXMessageIdItemChanged                      |
       
  1096                     |      KMPXMessageChangeEventType  = EMPXItemDeleted                               |
       
  1097                     |      KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo                        |
       
  1098                     |      KMPXMessageCollectionId     = KVcxUidMyVideosMpxCollection                  |
       
  1099                     |      KMPXMessageMediaGeneralId   = MPX ID (ID of the album which was removed)    |
       
  1100                     |<---------------------------------------------------------------------------------|
       
  1101 
  1063 */
  1102 */
  1064 
  1103 
  1065 #endif // VCXMYVIDEOSDEFS_H
  1104 #endif // VCXMYVIDEOSDEFS_H
  1066 
  1105