messagingappbase/sendui/mmsindirectupload/inc/CMmsIndirectUpload.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Provides MMS indirect upload service.
       
    15 *                Creates MMS message and launches the MMS editor.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CMMSINDIRECTUPLOAD_H
       
    23 #define CMMSINDIRECTUPLOAD_H
       
    24 
       
    25 // INCLUDES
       
    26 #include    <CSendingService.h>
       
    27 #include    <sendas2.h>
       
    28 #include    <centralrepository.h>
       
    29 #include    <MessagingInternalCRKeys.h>
       
    30 #include    <MmsEngineInternalCRKeys.h>
       
    31 #include    <coemain.h>
       
    32 
       
    33 class CSendUiAttachment;
       
    34 class CSendUiSingleton;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39  * CMmsIndirectUpload provides MMS Indirect Upload service.
       
    40  * Creates MMS message and launches MMS editor.
       
    41  * @lib MmsIndirectUpload.dll
       
    42  * @since Series 60 2.8
       
    43  */
       
    44 class CMmsIndirectUpload : public CSendingService
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47         
       
    48         /**
       
    49         * Two-phased constructor.
       
    50         */
       
    51         static CMmsIndirectUpload* NewL( TSendingServiceParams* aParams );
       
    52 
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         virtual ~CMmsIndirectUpload();
       
    57 
       
    58     public: // Functions from base classes
       
    59 
       
    60         /**
       
    61         * From CSendingService
       
    62         * Populates given list with the provided services.
       
    63         * @since Series 60 2.8
       
    64         * @param aList Service list to be populated. 
       
    65         * @return None
       
    66         */
       
    67         void PopulateServicesListL(
       
    68             RPointerArray<CSendingServiceInfo>& aList );
       
    69 
       
    70         /**
       
    71         * From CSendingService
       
    72         * Creates message to be sent and calls MTM to edit the message.
       
    73         * @since Series 60 2.8
       
    74         * @param aServiceUid Uid of the sending service.
       
    75         * @param aMessageData Data for the message.
       
    76         * @return none
       
    77         */
       
    78         void CreateAndSendMessageL(
       
    79             TUid aServiceUid,
       
    80             const CMessageData* aMessageData,
       
    81             TBool aLaunchEditorEmbedded = ETrue);
       
    82 
       
    83         /**
       
    84         * From CSendingService
       
    85         * Returns the id of the service provider.
       
    86         * @since Series 60 2.8
       
    87         * @return Id of the service provider.
       
    88         */
       
    89         TUid ServiceProviderId() const;
       
    90 
       
    91         TUid TechnologyTypeId( ) const;
       
    92 
       
    93 
       
    94     private:
       
    95 
       
    96         /**
       
    97         * C++ default constructor.
       
    98         */
       
    99         CMmsIndirectUpload( CCoeEnv& aCoeEnv, CSendUiSingleton& aSingleton );
       
   100 
       
   101         /**
       
   102         * By default Symbian 2nd phase constructor is private.
       
   103         */
       
   104         void ConstructL();
       
   105 
       
   106     private:  // New functions
       
   107 
       
   108         /**
       
   109         * Validates attachments for sending.
       
   110         * DRM protection and MMS validity are checked.
       
   111         * DRM query and error note is shown if needed.
       
   112         * Return value of attachment arrays contains valid attachments.
       
   113         * @since Series 60 3.0
       
   114         * @param aMessageData Message data package containing original
       
   115         *        attachments.
       
   116         * @param aValidAttachmentPaths Return value contains valid
       
   117         *        attachment paths.
       
   118         * @param aValidAttachmentHandles Return value contains valid
       
   119         *        attachment handles.
       
   120         * @return ETrue if sending can continue, otherwise EFalse.
       
   121         */
       
   122         TBool ValidateAttachmentsL( CArrayPtrFlat<CSendUiAttachment>* aAttachments );
       
   123 
       
   124         /**
       
   125         * Checks MMS service availability.
       
   126         * @since Series 60 3.0
       
   127         * @return ETrue when MMS service is available, otherwise EFalse.
       
   128         */
       
   129         TBool CheckMmsServiceAvailabilityL( RSendAs& aSendAsSession );
       
   130 
       
   131         /**
       
   132         * Reads service data from resources and from shared data or from
       
   133         * central repository.
       
   134         * @since Series 60 2.8
       
   135         * @return None.
       
   136         */
       
   137         void ReadServiceDataL();
       
   138 
       
   139     private:  // Data
       
   140 
       
   141         // Contains pointers to the data of the services provided by this plugin.
       
   142         // Pointed service data objects are owned.
       
   143         RPointerArray<CSendingServiceInfo>          iServiceArray;
       
   144 
       
   145     };
       
   146 
       
   147 #endif      // CMMSINDIRECTUPLOAD_H
       
   148 
       
   149 // End of File