idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/inc/xntexteditorpublisher.h
changeset 0 f72a12da539e
child 88 3321d3e205b6
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2005-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:  CPS Publishing for text editor.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef XNTEXTEDITORPUBLISHER_H
       
    19 #define XNTEXTEDITORPUBLISHER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <eikedwob.h>
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CLiwServiceHandler;
       
    26 class MLiwInterface;
       
    27 class CXnTextEditorAdapter;
       
    28 
       
    29 class CXnTextEditorPublisher : public CBase, public MEikEdwinObserver
       
    30     {
       
    31     public:
       
    32         /**
       
    33         * Two-phased constructor.
       
    34         */
       
    35         static CXnTextEditorPublisher* NewL( CXnTextEditorAdapter& aAdapter, 
       
    36             const TDesC8& aNodeId );
       
    37 
       
    38         /**
       
    39         * Destructor.
       
    40         */
       
    41         virtual ~CXnTextEditorPublisher();
       
    42         
       
    43     private:
       
    44         CXnTextEditorPublisher( CXnTextEditorAdapter& aAdapter );
       
    45         void ConstructL( const TDesC8& aNodeId );
       
    46 
       
    47     public: // From MEikEdwinObserver
       
    48         /**
       
    49         * @see MEikEdwinObserver.
       
    50         */    
       
    51         void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType);
       
    52         
       
    53         void PublishTextL( const TDesC& aText );
       
    54 
       
    55     private: // New functions
       
    56         void InitCpsInterfaceL();
       
    57         void AddDataToCpsL( const TDesC& aPublisherId, const TDesC& aContentType, 
       
    58             const TDesC& aContentId, const TDesC8& aDataKey, const TDesC& aData );
       
    59         void RemoveDataFromCpsL( const TDesC& aPublisherId, const TDesC& aContentType, 
       
    60             const TDesC& aContentId );
       
    61 
       
    62 
       
    63     private:
       
    64         CXnTextEditorAdapter&  iAdapter;
       
    65         HBufC*                 iNodeId; // Own
       
    66 		MLiwInterface*         iCpsInterface; // Not own
       
    67 		CLiwServiceHandler*    iServiceHandler;	// Own
       
    68 		HBufC*                 iTextBuffer;   // Own
       
    69     };
       
    70 
       
    71 #endif //XNTEXTEDITORPUBLISHER_H
       
    72 
       
    73 
       
    74 
       
    75 
       
    76