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; |
38 const TInt KVcxMvcCategoryIdOther = 4; |
42 const TInt KVcxMvcCategoryIdOther = 4; |
|
43 const TInt KCategoryIdLastWatched = 5; |
|
44 const TInt KCategoryIdExtraItem1 = 6; |
|
45 const TInt KCategoryIdExtraItem2 = 7; |
|
46 const TInt KCategoryIdExtraItem3 = 8; |
|
47 |
|
48 /** |
|
49 * My Videos Custom command ID |
|
50 * |
|
51 * This is sent to MPX video player app UI, |
|
52 * when the my videos main view is initialized, and |
|
53 * player app should do the background initialization. |
|
54 */ |
|
55 const TInt KVcxMyVideosCmdDoLateConstruct = 0x20016B9D; |
39 |
56 |
40 /** |
57 /** |
41 * Same as KIptvUrlMaxLength in IptvUtil.h. |
58 * Same as KIptvUrlMaxLength in IptvUtil.h. |
42 * Comment copied from IptvUtil.h: |
59 * Comment copied from IptvUtil.h: |
43 * As far as I know url specification allows url to be as big as 2048, but |
60 * As far as I know url specification allows url to be as big as 2048, but |
44 * S60 (v3.1/w31) download manager crashes if url length goes somewhere around |
61 * S60 (v3.1/w31) download manager crashes if url length goes somewhere around |
45 * 1200-1400 so we need to limit it here. If someone finds out that |
62 * 1200-1400 so we need to limit it here. If someone finds out that |
46 * download manager get fixed please feel free to change value to 2048 |
63 * download manager get fixed please feel free to change value to 2048 |
47 */ |
64 */ |
48 const TInt KVcxMvcMaxUrlLength = 1024; |
65 const TInt KVcxMvcMaxUrlLength = 1024; |
|
66 |
|
67 /** |
|
68 * Maximum length of KMPXMediaGeneralTitle attribute. Limiting factor |
|
69 * comes from MDS. |
|
70 */ |
|
71 const TInt KVcxMvcMaxTitleLength = 255; |
49 |
72 |
50 /** |
73 /** |
51 * Content ID (UID) identifying My Videos category of content provided |
74 * Content ID (UID) identifying My Videos category of content provided |
52 * in the media object and associated attributes. |
75 * in the media object and associated attributes. |
53 */ |
76 */ |
488 const TInt KVcxCommandMyVideosGetMediaFullDetailsByMpxId = 4; //async |
542 const TInt KVcxCommandMyVideosGetMediaFullDetailsByMpxId = 4; //async |
489 const TInt KVcxCommandMyVideosGetMediasByMpxId = 5; //async |
543 const TInt KVcxCommandMyVideosGetMediasByMpxId = 5; //async |
490 const TInt KVcxCommandMyVideosMove = 6; //async |
544 const TInt KVcxCommandMyVideosMove = 6; //async |
491 const TInt KVcxCommandMyVideosCopy = 7; //async |
545 const TInt KVcxCommandMyVideosCopy = 7; //async |
492 const TInt KVcxCommandMyVideosDelete = 8; //async |
546 const TInt KVcxCommandMyVideosDelete = 8; //async |
|
547 const TInt KVcxCommandMyVideosAddToAlbum = 9; //async |
|
548 const TInt KVcxCommandMyVideosRemoveFromAlbum = 10; //async |
|
549 const TInt KVcxCommandMyVideosAddAlbum = 11; //async & sync |
|
550 const TInt KVcxCommandMyVideosRemoveAlbums = 12; //async |
493 |
551 |
494 /** This command cancels the move or copy operation only if it |
552 /** This command cancels the move or copy operation only if it |
495 * is allready being processed by the collection plugin. If the |
553 * is allready being processed by the collection plugin. If the |
496 * command is still in queue, this cancel has no effect. |
554 * command is still in queue, this cancel has no effect. |
497 * If Move or Copy operations were not in progress the command |
555 * If Move or Copy operations were not in progress the command |
498 * leaves with KErrNotFound. |
556 * leaves with KErrNotFound. |
499 */ |
557 */ |
500 const TInt KVcxCommandMyVideosCancelMoveOrCopy = 9; //sync |
558 const TInt KVcxCommandMyVideosCancelMoveOrCopy = 13; //sync |
501 |
559 |
502 /** This command cancels the delete operation only if it |
560 /** This command cancels the delete operation only if it |
503 * is allready being processed by the collection plugin. If the |
561 * is allready being processed by the collection plugin. If the |
504 * command is still in queue, this cancel has no effect. |
562 * command is still in queue, this cancel has no effect. |
505 * If delete operation was not in progress the command |
563 * If delete operation was not in progress the command |
506 * leaves with KErrNotFound. |
564 * leaves with KErrNotFound. |
507 */ |
565 */ |
508 const TInt KVcxCommandMyVideosCancelDelete = 10; //sync |
566 const TInt KVcxCommandMyVideosCancelDelete = 14; //sync |
509 |
567 |
510 const TInt KVcxMessageMyVideosGetMediasByMpxIdResp = 11; |
568 const TInt KVcxMessageMyVideosGetMediasByMpxIdResp = 15; |
511 |
569 |
512 /** |
570 /** |
513 * Collection sends this message when new items are added |
571 * Collection sends this message when new items are added |
514 * to the end of the collection plugins cache. If client has not yet received |
572 * to the end of the collection plugins cache. If client has not yet received |
515 * KVcxMessageMyVideosListComplete event, then the media list received with |
573 * KVcxMessageMyVideosListComplete event, then the media list received with |
518 * call to keep collection frameworks path variable updated. |
576 * call to keep collection frameworks path variable updated. |
519 * KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events |
577 * KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events |
520 * are broadcasted to all clients. So they might appear even when client hasn't |
578 * are broadcasted to all clients. So they might appear even when client hasn't |
521 * done OpenL. |
579 * done OpenL. |
522 */ |
580 */ |
523 const TInt KVcxMessageMyVideosItemsAppended = 12; //event |
581 const TInt KVcxMessageMyVideosItemsAppended = 16; //event |
524 |
582 |
525 /** |
583 /** |
526 * Collection sends this message when media list fetching has ended |
584 * Collection sends this message when media list fetching has ended |
527 * and no more KVcxMessageMyVideosItemsAppended events will be sent. |
585 * and no more KVcxMessageMyVideosItemsAppended events will be sent. |
528 * Collection also cuts off the shared memory connection to video lists |
586 * Collection also cuts off the shared memory connection to video lists |
529 * between clients and collection. Ie, if new KVcxMessageMyVideosItemsAppended |
587 * between clients and collection. Ie, if new KVcxMessageMyVideosItemsAppended |
530 * events arrive after this event, the client knows that they are not automatically |
588 * 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 |
589 * in the list it had received earlier (unless client itself initiated the new fetching |
532 * by calling OpenL(). |
590 * by calling OpenL(). |
533 */ |
591 */ |
534 const TInt KVcxMessageMyVideosListComplete = 13; //event |
592 const TInt KVcxMessageMyVideosListComplete = 17; //event |
535 |
593 |
536 /* Collection sends this message when it starts processing |
594 /* Collection sends this message when it starts processing |
537 * Move Or Copy command. When this event is received, |
595 * Move Or Copy command. When this event is received, |
538 * KVcxCommandMyVideosCancelMoveOrCopy can be sent. |
596 * KVcxCommandMyVideosCancelMoveOrCopy can be sent. |
539 */ |
597 */ |
540 const TInt KVcxMessageMyVideosMoveOrCopyStarted = 14; //event |
598 const TInt KVcxMessageMyVideosMoveOrCopyStarted = 18; //event |
541 |
599 |
542 /* Collection sends this message when it starts processing |
600 /* Collection sends this message when it starts processing |
543 * KVcxCommandMyVideosDelete command. After this event is received, |
601 * KVcxCommandMyVideosDelete command. After this event is received, |
544 * KVcxCommandMyVideosCancelDelete can be sent. |
602 * KVcxCommandMyVideosCancelDelete can be sent. |
545 */ |
603 */ |
546 const TInt KVcxMessageMyVideosDeleteStarted = 15; //event |
604 const TInt KVcxMessageMyVideosDeleteStarted = 19; //event |
547 |
605 |
548 /* End events for Move/Copy/Delete operations. The response contains |
606 /* End events for Move/Copy/Delete operations. The response contains |
549 * MDS ID and error codes for each item. |
607 * MDS ID and error codes for each item. |
550 */ |
608 */ |
551 const TInt KVcxMessageMyVideosMoveResp = 16; //event |
609 const TInt KVcxMessageMyVideosMoveResp = 20; //event |
552 const TInt KVcxMessageMyVideosCopyResp = 17; //event |
610 const TInt KVcxMessageMyVideosCopyResp = 21; //event |
553 const TInt KVcxMessageMyVideosDeleteResp = 18; //event |
611 const TInt KVcxMessageMyVideosDeleteResp = 22; //event |
554 |
612 |
555 /** |
613 /** |
556 * Indicates that media array variable contains other messages. |
614 * Indicates that media array variable contains other messages. |
557 * This message is only sent as the highest level item in the message tree. |
615 * This message is only sent as the highest level item in the message tree. |
558 */ |
616 */ |
559 const TInt KVcxMessageMyVideosMessageArray = 19; |
617 const TInt KVcxMessageMyVideosMessageArray = 23; |
560 |
618 |
561 /* |
619 /* |
562 OpenL() (video list) MSC |
620 OpenL() (video list) MSC |
563 ------------------------ |
621 ------------------------ |
564 Opening the collection is quite complicated due the fact that it allows multiple clients to open |
622 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 |
623 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 |
624 has the video list already fetched, then the HandleOpenL will contain all videos and KVcxMessageMyVideosListComplete |
567 is received immedetially. |
625 is received immedetially. |
568 |
626 |
569 KVcxMessageMyVideosItemsAppended and KVcxMessageMyVideosListComplete events concern only video lists. |
627 The list complete status (EVcxMyVideosVideoListComplete) is also written to aEntries KVcxMediaMyVideosInt32Value |
570 Category level always returns all categories at HandleOpenL. |
628 attribute when the list is complete. |
571 |
629 |
572 .------. .-------------------------. |
630 .------. .-------------------------. |
573 |CLIENT| |MPX My Videos Collection | |
631 |CLIENT| |MPX My Videos Collection | |
574 '------' '-------------------------' |
632 '------' '-------------------------' |
575 | | |
633 | | |
576 | | |
634 | | |
611 | after this point (without client doing OpenL()), it means that someone else | |
669 | after this point (without client doing OpenL()), it means that someone else | |
612 | changed sorting order and started fetching new video list. | |
670 | changed sorting order and started fetching new video list. | |
613 | In that case this client should also fetch new list by calling OpenL(). | |
671 | In that case this client should also fetch new list by calling OpenL(). | |
614 |<---------------------------------------------------------------------------------| |
672 |<---------------------------------------------------------------------------------| |
615 | | |
673 | | |
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 | | |
674 | | |
727 |
675 |
728 |
676 |
729 GET MEDIA FULL DETAILS BY MPX ID MSC |
677 GET MEDIA FULL DETAILS BY MPX ID MSC |
730 ------------------------------------ |
678 ------------------------------------ |
793 | KMPXMediaArrayContents = Media array (CMPXMediaArray) | |
742 | KMPXMediaArrayContents = Media array (CMPXMediaArray) | |
794 | KMPXMessageCollectionId = KVcxUidMyVideosMpxCollection | |
743 | KMPXMessageCollectionId = KVcxUidMyVideosMpxCollection | |
795 |<---------------------------------------------------------------------------------| |
744 |<---------------------------------------------------------------------------------| |
796 | | |
745 | | |
797 |
746 |
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 |
747 |
876 VIDEO ADD MSC |
748 VIDEO ADD MSC |
877 ------------- |
749 ------------- |
878 |
750 |
879 Currently only synchronous version is supported. Only one item can be added per call. This is currently |
751 Currently only synchronous version is supported. Only one item can be added per call. This is currently |
1050 | Media array contains array of CMPXMedia objects which contain: | |
925 | Media array contains array of CMPXMedia objects which contain: | |
1051 | KMPXMessageMediaGeneralId = MPX ID | |
926 | KMPXMessageMediaGeneralId = MPX ID | |
1052 | KVcxMediaMyVideosInt32Value = result (system wide error code) | |
927 | KVcxMediaMyVideosInt32Value = result (system wide error code) | |
1053 |<---------------------------------------------------------------------------------| |
928 |<---------------------------------------------------------------------------------| |
1054 | | |
929 | | |
1055 | HandleCommandComplete(videoDeleteCommand, FAIL/SUCCESS) | |
930 | HandleCommandComplete(videoDeleteCommand, KErrNone) | |
|
931 | videoDeleteCommand KVcxMediaMyVideosInt32Value contains KErrNone if everything went |
|
932 | OK. If value is != KErrNone, then something went wrong and command was ended| |
|
933 | prematurely. | |
1056 |<---------------------------------------------------------------------------------| |
934 |<---------------------------------------------------------------------------------| |
1057 |
935 |
1058 |
936 |
1059 CANCEL VIDEO DELETE MSC |
937 CANCEL VIDEO DELETE MSC |
1060 ----------------------- |
938 ----------------------- |
1061 |
939 |
1062 |
940 |
|
941 |
|
942 ADD VIDEOS TO ALBUM MSC |
|
943 ----------------------- |
|
944 Notice that adding items to album does not add videos from collection. Ie item added events |
|
945 will not arrive for this operation. Instead the modify event is sent for the album item which is |
|
946 affected. |
|
947 .------. .-------------------------. |
|
948 |CLIENT| |MPX My Videos Collection | |
|
949 '------' '-------------------------' |
|
950 | | |
|
951 | | |
|
952 iCollectionUtility->Collection().CommandL( *cmd ) | |
|
953 | |
|
954 cmd (CMPXCommand type) contains: | |
|
955 KMPXCommandGeneralId = KVcxCommandIdMyVideos | |
|
956 KVcxMediaMyVideosCommandId = KVcxCommandMyVideosAddToAlbum | |
|
957 KMPXCommandGeneralCollectionId = 0x20016B97 | |
|
958 KMPXCommandGeneralDoSync = EFalse | |
|
959 KVcxMediaMyVideosTransactionId = TR ID | |
|
960 KVcxMediaMyVideosUint32Value = Album MDS ID (album where to add) | |
|
961 KMPXMediaArrayContents = Media array (CMPXMediaArray) | |
|
962 Media array contains array of CMPXMedia objects which contain: | |
|
963 KMPXMediaGeneralId = video MPX ID (video to add) | |
|
964 |--------------------------------------------------------------------------------->| |
|
965 | | |
|
966 | HandleCommandComplete(cmd, KErrNone) | |
|
967 | cmd is the same as was given in .CommandL() call. | |
|
968 | cmd contains in addition to parameters set earlier: | |
|
969 | 1. Media array has error codes set to each array item: | |
|
970 | KVcxMediaMyVideosInt32Value = KErrNone if successful, | |
|
971 | KErrGeneral or KErrAlreadyExists otherwise. | |
|
972 | 2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went | |
|
973 | OK. If value is != KErrNone, then something went wrong and individual | |
|
974 | error codes for array items might not contain values. | |
|
975 |<---------------------------------------------------------------------------------| |
|
976 | | |
|
977 | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError ) | |
|
978 | | |
|
979 | aMessage contains: | |
|
980 | KMPXMessageGeneralId = KMPXMessageIdItemChanged | |
|
981 | KMPXMessageChangeEventType = EMPXItemModified | |
|
982 | KVcxMediaMyVideosInt32Value = EVcxMyVideosVideoListOrderChanged | |
|
983 | KMPXMessageCollectionId = KVcxUidMyVideosMpxCollection | |
|
984 | KMPXMessageMediaGeneralId = MPX ID (ID of the album which had videos added) |
|
985 |<---------------------------------------------------------------------------------| |
|
986 |
|
987 |
|
988 REMOVE VIDEOS FROM ALBUM MSC |
|
989 ---------------------------- |
|
990 |
|
991 Notice that removing items from album does not remove videos from collection. Ie item deleted events |
|
992 will not arrive for this operation. Instead the modify event is sent for the album item which is |
|
993 affected. |
|
994 .------. .-------------------------. |
|
995 |CLIENT| |MPX My Videos Collection | |
|
996 '------' '-------------------------' |
|
997 | | |
|
998 | | |
|
999 iCollectionUtility->Collection().CommandL( *cmd ) | |
|
1000 | |
|
1001 cmd (CMPXCommand type) contains: | |
|
1002 KMPXCommandGeneralId = KVcxCommandIdMyVideos | |
|
1003 KVcxMediaMyVideosCommandId = KVcxCommandMyVideosRemoveFromAlbum | |
|
1004 KMPXCommandGeneralCollectionId = 0x20016B97 | |
|
1005 KMPXCommandGeneralDoSync = EFalse | |
|
1006 KVcxMediaMyVideosTransactionId = TR ID | |
|
1007 KVcxMediaMyVideosUint32Value = Album MDS ID (iId1 member of TMPXItemId, album where from to remove) |
|
1008 KMPXMediaArrayContents = Media array (CMPXMediaArray) | |
|
1009 Media array contains array of CMPXMedia objects which contain: | |
|
1010 KMPXMediaGeneralId = video MPX ID (video to remove) | |
|
1011 |--------------------------------------------------------------------------------->| |
|
1012 | | |
|
1013 | HandleCommandComplete(cmd, KErrNone) | |
|
1014 | cmd is the same as was given in .CommandL() call. | |
|
1015 | cmd contains in addition to parameters set earlier: | |
|
1016 | 1. Media array has error codes set to each array item: | |
|
1017 | KVcxMediaMyVideosInt32Value = KErrNone if successful, KErrGeneral otherwise. |
|
1018 | 2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went | |
|
1019 | OK. If value is != KErrNone, then something went wrong and individual | |
|
1020 | error codes for array items might not contain values. | |
|
1021 |<---------------------------------------------------------------------------------| |
|
1022 | | |
|
1023 | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError ) | |
|
1024 | | |
|
1025 | aMessage contains: | |
|
1026 | KMPXMessageGeneralId = KMPXMessageIdItemChanged | |
|
1027 | KMPXMessageChangeEventType = EMPXItemModified | |
|
1028 | KVcxMediaMyVideosInt32Value = EVcxMyVideosVideoListOrderChanged | |
|
1029 | KMPXMessageCollectionId = KVcxUidMyVideosMpxCollection | |
|
1030 | KMPXMessageMediaGeneralId = MPX ID (ID of the album which had videos removed) |
|
1031 |<---------------------------------------------------------------------------------| |
|
1032 |
|
1033 ADD ALBUM MSC |
|
1034 ------------- |
|
1035 |
|
1036 Asynchronous version: |
|
1037 |
|
1038 .------. .-------------------------. |
|
1039 |CLIENT| |MPX My Videos Collection | |
|
1040 '------' '-------------------------' |
|
1041 | | |
|
1042 | | |
|
1043 iCollectionUtility->Collection().CommandL( *cmd ) | |
|
1044 | |
|
1045 cmd (CMPXCommand type) contains: | |
|
1046 KMPXCommandGeneralId = KVcxCommandIdMyVideos | |
|
1047 KVcxMediaMyVideosCommandId = KVcxCommandMyVideosAddAlbum | |
|
1048 KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97) | |
|
1049 KMPXCommandGeneralDoSync = EFalse | |
|
1050 KVcxMediaMyVideosTransactionId = TR ID | |
|
1051 KMPXMediaGeneralTitle = Album title text | |
|
1052 |--------------------------------------------------------------------------------->| |
|
1053 | | |
|
1054 | HandleCommandComplete(cmd, KErrNone) | |
|
1055 | cmd is the same as was given in .CommandL() call. | |
|
1056 | cmd contains in addition to parameters set earlier: | |
|
1057 | 1. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went | |
|
1058 | OK. If value is != KErrNone, then something went wrong. | |
|
1059 | 2. KMPXMediaGeneralId contains the MPX ID of the new album. | |
|
1060 |<---------------------------------------------------------------------------------| |
|
1061 | | |
|
1062 | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError ) | |
|
1063 | | |
|
1064 | aMessage contains: | |
|
1065 | KMPXMessageGeneralId = KMPXMessageIdItemChanged | |
|
1066 | KMPXMessageChangeEventType = EMPXItemInserted | |
|
1067 | KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo | |
|
1068 | KMPXMessageCollectionId = KVcxUidMyVideosMpxCollection | |
|
1069 | KMPXMessageMediaGeneralId = MPX ID (ID of the new album) | |
|
1070 | KMPXCommandColAddMedia = MPX media of the new album (CMPXMedia) | |
|
1071 |<---------------------------------------------------------------------------------| |
|
1072 |
|
1073 Synchronous version: |
|
1074 |
|
1075 CommandL leaves if error occurs. |
|
1076 |
|
1077 .------. .-------------------------. |
|
1078 |CLIENT| |MPX My Videos Collection | |
|
1079 '------' '-------------------------' |
|
1080 | | |
|
1081 | | |
|
1082 iCollectionUtility->Collection().CommandL( *cmd ) | |
|
1083 | |
|
1084 cmd (CMPXCommand type) contains: | |
|
1085 KMPXCommandGeneralId = KVcxCommandIdMyVideos | |
|
1086 KVcxMediaMyVideosCommandId = KVcxCommandMyVideosAddAlbum | |
|
1087 KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97) | |
|
1088 KMPXCommandGeneralDoSync = ETrue | |
|
1089 KVcxMediaMyVideosTransactionId = TR ID | |
|
1090 KMPXMediaGeneralTitle = Album title text | |
|
1091 | |
|
1092 After the call KMPXMediaGeneralId attribute contains the MPX ID of the new album. | |
|
1093 |--------------------------------------------------------------------------------->. |
|
1094 |<---------------------------------------------------------------------------------' |
|
1095 | | |
|
1096 | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError ) | |
|
1097 | | |
|
1098 | aMessage contains: | |
|
1099 | KMPXMessageGeneralId = KMPXMessageIdItemChanged | |
|
1100 | KMPXMessageChangeEventType = EMPXItemInserted | |
|
1101 | KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo | |
|
1102 | KMPXMessageCollectionId = KVcxUidMyVideosMpxCollection | |
|
1103 | KMPXMessageMediaGeneralId = MPX ID (ID of the new album) | |
|
1104 | KMPXCommandColAddMedia = MPX media of the new album (CMPXMedia) | |
|
1105 |<---------------------------------------------------------------------------------| |
|
1106 |
|
1107 |
|
1108 |
|
1109 REMOVE ALBUMS MSC |
|
1110 ----------------- |
|
1111 |
|
1112 .------. .-------------------------. |
|
1113 |CLIENT| |MPX My Videos Collection | |
|
1114 '------' '-------------------------' |
|
1115 | | |
|
1116 | | |
|
1117 iCollectionUtility->Collection().CommandL( *cmd ) | |
|
1118 | |
|
1119 cmd (CMPXCommand type) contains: | |
|
1120 KMPXCommandGeneralId = KVcxCommandIdMyVideos | |
|
1121 KVcxMediaMyVideosCommandId = KVcxCommandMyVideosRemoveAlbums | |
|
1122 KMPXCommandGeneralCollectionId = KVcxUidMyVideosMpxCollection (0x20016B97) | |
|
1123 KMPXCommandGeneralDoSync = EFalse (only async supported) | |
|
1124 KVcxMediaMyVideosTransactionId = TR ID | |
|
1125 KMPXMediaArrayContents = Media array (CMPXMediaArray) | |
|
1126 Media array contains array of CMPXMedia objects which contain: | |
|
1127 KMPXMediaGeneralId = album MPX ID (album to remove) | |
|
1128 |--------------------------------------------------------------------------------->| |
|
1129 | | |
|
1130 | HandleCommandComplete(cmd, KErrNone) | |
|
1131 | cmd is the same as was given in .CommandL() call. | |
|
1132 | cmd contains in addition to parameters set earlier: | |
|
1133 | 1. Media array has error codes set to each array item: | |
|
1134 | KVcxMediaMyVideosInt32Value = KErrNone if successful, KErrGeneral otherwise. |
|
1135 | 2. cmd KVcxMediaMyVideosInt32Value contains KErrNone if everything went | |
|
1136 | OK. If value is != KErrNone, then something went wrong and individual | |
|
1137 | error codes for array items might not contain values. | |
|
1138 |<---------------------------------------------------------------------------------| |
|
1139 | | |
|
1140 | HandleCollectionMessage( CMPXMessage* aMessage, TInt aError ) | |
|
1141 | | |
|
1142 | aMessage contains: | |
|
1143 | KMPXMessageGeneralId = KMPXMessageIdItemChanged | |
|
1144 | KMPXMessageChangeEventType = EMPXItemDeleted | |
|
1145 | KVcxMediaMyVideosInt32Value = EVcxMyVideosListNoInfo | |
|
1146 | KMPXMessageCollectionId = KVcxUidMyVideosMpxCollection | |
|
1147 | KMPXMessageMediaGeneralId = MPX ID (ID of the album which was removed) | |
|
1148 |<---------------------------------------------------------------------------------| |
|
1149 |
1063 */ |
1150 */ |
1064 |
1151 |
1065 #endif // VCXMYVIDEOSDEFS_H |
1152 #endif // VCXMYVIDEOSDEFS_H |
1066 |
1153 |