ipappsrv_plat/multimedia_comms_api/inc/mcemessagesource.h
branchrcs
changeset 49 64c62431ac08
child 50 1d8943dd8be6
equal deleted inserted replaced
44:fb024d5e35fa 49:64c62431ac08
       
     1 /*
       
     2 * Copyright (c) 2006 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMCEMESSAGESOURCE_H
       
    21 #define CMCEMESSAGESOURCE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <mcemediasource.h>
       
    26 
       
    27 //FORWARD DECLARATIONS
       
    28 class CMceManager;
       
    29 class CMceItcSender;
       
    30 class CMceDataSender;
       
    31 
       
    32 // CONSTANTS
       
    33 const TMceSourceType KMceMessageSource = 12;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 /**
       
    37 * Class representing a source for a Message stream.
       
    38 * 
       
    39 *  @lib mceclient.lib
       
    40 */
       
    41 class CMceMessageSource: public CMceMediaSource
       
    42     {
       
    43 
       
    44     public: // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         IMPORT_C static CMceMessageSource* NewL(CMceManager& aManager);
       
    50 
       
    51         /**
       
    52         * Two-phased constructor.
       
    53         */
       
    54         IMPORT_C static CMceMessageSource* NewLC(CMceManager& aManager);
       
    55 
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         IMPORT_C ~CMceMessageSource();
       
    60 
       
    61     public: // From CMceMediaSource
       
    62 
       
    63         /**
       
    64         * Sets the source enabled.
       
    65         */
       
    66         IMPORT_C void EnableL(); 
       
    67 
       
    68         /**
       
    69         * Sets the source disabled.
       
    70         */
       
    71         IMPORT_C void DisableL(); 
       
    72         
       
    73 	public: // New functions
       
    74 
       
    75 	    /**
       
    76 	    * Sends data into stream
       
    77 	    */
       
    78         IMPORT_C void SendDataL( const TDesC8& aData ); 
       
    79 	public: // internal
       
    80 	
       
    81 	    /**
       
    82 	    * Initializes 
       
    83 	    * @param aManager the manager. Ownership is NOT transferred
       
    84 	    */
       
    85 	    void InitializeL( CMceManager* aManager );
       
    86     public:
       
    87 
       
    88 	    /**
       
    89 	    * Two-phased constructor.
       
    90 	    */
       
    91 		static CMceMessageSource* NewL();
       
    92 
       
    93 	    /**
       
    94 	    * Two-phased constructor.
       
    95 	    */
       
    96 		static CMceMessageSource* NewLC();
       
    97 
       
    98 	private: //methods
       
    99 
       
   100 	    /**
       
   101 	     * C++ default constructor.
       
   102 	     */
       
   103 		CMceMessageSource();
       
   104 
       
   105 	    /**
       
   106 	    * Second-phase constructor.
       
   107 	    */
       
   108 		void ConstructL(CMceManager* aManager);
       
   109 		
       
   110 	    void ConstructL();
       
   111     
       
   112 		
       
   113 	private:
       
   114 	    
       
   115         CMceDataSender* iDataSender;
       
   116         TAny* iReserved;  
       
   117     };
       
   118 
       
   119 #endif // CMCEMESSAGESOURCE_H