sipexsocketwriter.h

来自「an example for sip for symbian」· C头文件 代码 · 共 106 行

H
106
字号
/*
* ==============================================================================
*  Name        : SIPExSocketWriter.h
*  Part of     : SIPExSocketEngine
*  Interface   : 
*  Description : 
*  Version     : 
*
*  Copyright (c) 2004-2006 Nokia Corporation.
*  This material, including documentation and any related 
*  computer programs, is protected by copyright controlled by 
*  Nokia Corporation.
* ==============================================================================
*/

#ifndef __CSIPEXSOCKETWRITER_H__
#define __CSIPEXSOCKETWRITER_H__

#include <e32base.h>

// FORWARD DECLARATIONS
class MSIPExWriterNotifier;
class RSocket;

/**
* CSIPExSocketWriter
* Writes data to the connected socket.
*/
class CSIPExSocketWriter : public CActive
    {
    public:

        /**
        * NewL
        * Static constructor
        * @param aSocket The reference to the socket
        * @param aNotifier The reference to the writer notifier
        */
        static CSIPExSocketWriter* NewL( RSocket& aSocket, MSIPExWriterNotifier& aNotifier );

        /**
        * NewLC
        * Static constructor. On return the instance is left to the CleanupStack.
        * @param aSocket The reference to the socket
        * @param aNotifier The reference to the writer notifier
        */
        static CSIPExSocketWriter* NewLC( RSocket& aSocket, MSIPExWriterNotifier& aNotifier );

        /**
        * ~CSIPExSocketWriter
        * Destructor
        */
        ~CSIPExSocketWriter();

    public:
 
        /**
        * Write
        * Asynchronous function.
        * Starts the asynchronous writing.
        */
        void Write( const TDesC8& aBuffer );

    protected: // from CActive

        /**
        * From CActive
        */
        void DoCancel();

        /**
        * From CActive
        */
        void RunL();

    private:
    
        /**
        * CSIPExSocketWriter
        * Constructor
        * @param aSocket The reference to the socket
        * @param aNotifier The reference to the writer notifier
        */
        CSIPExSocketWriter( RSocket& aSocket, MSIPExWriterNotifier& aNotifier );

        /**
        * ConstructL
        * Symbian 2nd phase constructor that might leave
        */
        void ConstructL();

    private:
        // Member variables
        MSIPExWriterNotifier&   iNotifier;

        // Ref: Data socket
        RSocket&    iSocket;

        // The write buffer
        HBufC8*     iBuffer;
    };

#endif // __CSOCKETWRITER_H__

// End of file

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?