⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 messageserviceadvertiser.h

📁 Symbian下的p2p工程
💻 H
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */


#ifndef __CMESSAGE_SERVICE_ADVERTISER__
#define __CMESSAGE_SERVICE_ADVERTISER__

// INCLUDES
#include <e32base.h>
#include <btsdp.h>
#include <btmanclient.h>

#include "BTServiceAdvertiser.h"


// CLASS DECLARATIONS
/**
* CMessageServiceAdvertiser
* Advertises the message service using the SDP database.
*/
class CMessageServiceAdvertiser : public CBTServiceAdvertiser
    {
    public: // Constructors and destructor

        /**
        * NewL()
        * Create a CMessageServiceAdvertiser object
        * @return a pointer to the created instance of
        * CMessageServiceAdvertiser
        */
        static CMessageServiceAdvertiser* NewL();

        /**
        * NewLC()
        * Create a CMessageServiceAdvertiser object, which will
        * draw itself to aRect.
        * @return a pointer to the created instance of
        * CMessageServiceAdvertiser
        */
        static CMessageServiceAdvertiser* NewLC();

        /*
        * ~CMessageServiceAdvertiser()
        * Destroy the object and release all memory objects.
        * Close any open sockets
        */
        virtual ~CMessageServiceAdvertiser();

    protected: // from CBTServiceAdvertiser

        /**
        * BuildProtocolDescriptionL()
        * Builds the protocol description
        * @param aProtocolDescriptor the protocol descriptor
        * @param aPort the service port
        */
        void BuildProtocolDescriptionL(
            CSdpAttrValueDES* aProtocolDescriptor, TInt aPort );


        /**
        * ServiceClass()
        * @return the service class
        */
        const TInt ServiceClass();

        /**
        * ServiceName()
        * @return the service name
        */
        const TDesC& ServiceName();

        /**
        * ServiceDescription()
        * @return the service description
        */
        const TDesC& ServiceDescription();

    private:    // Constructors

        /**
        * CMessageServiceAdvertiser()
        * Constructs this object
        */
        CMessageServiceAdvertiser();

        /**
        * ConstructL()
        * 2nd phase construction of this object
        */
        void ConstructL();

    private:    // data

        /**
        * iServiceName
        * Owned by CMessageServiceAdvertiser
        */
        HBufC* iServiceName;

        /**
        * iServiceDescription
        * Owned by CMessageServiceAdvertiser
        */
        HBufC* iServiceDescription;
    };

#endif // __CMESSAGE_SERVICE_ADVERTISER__

// End of File

⌨️ 快捷键说明

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