S60 3rd Edition SDK for Symbian OS
Example Applications Guide

ChatServiceAdvertiser.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : ChatServiceAdvertiser.h
00004 *  Part of     : Chat
00005 *  Interface   : 
00006 *  Description : 
00007 *  Version     : 
00008 *
00009 *  Copyright (c) 2005-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 #ifndef CHATSERVICEADVERTISER_H
00017 #define CHATSERVICEADVERTISER_H
00018 
00019 // INCLUDES
00020 #include <e32base.h>
00021 #include <btsdp.h>
00022 #include "ChatBtServiceAdvertiser.h"
00023 
00024 
00025 // CLASS DECLARATIONS
00026 /**
00027 * CChatServiceAdvertiser
00028 * Advertises the message service using the SDP database.
00029 */
00030 class CChatServiceAdvertiser : public CChatBtServiceAdvertiser
00031     {
00032     public: // Constructors and destructor
00033 
00034         /**
00035         * NewL()
00036         * Create a CChatServiceAdvertiser object
00037         * @return a pointer to the created instance of
00038         * CChatServiceAdvertiser
00039         */
00040         static CChatServiceAdvertiser* NewL();
00041 
00042         /**
00043         * NewLC()
00044         * Create a CChatServiceAdvertiser object, which will
00045         * draw itself to aRect.
00046         * @return a pointer to the created instance of
00047         * CChatServiceAdvertiser
00048         */
00049         static CChatServiceAdvertiser* NewLC();
00050 
00051         /**
00052         * ~CChatServiceAdvertiser()
00053         * Destroy the object and release all memory objects.
00054         * Close any open sockets
00055         */
00056         virtual ~CChatServiceAdvertiser();
00057 
00058     protected: // from CChatBtServiceAdvertiser
00059 
00060         /**
00061         * BuildProtocolDescriptionL()
00062         * Builds the protocol description
00063         * @param aProtocolDescriptor the protocol descriptor
00064         * @param aPort the service port
00065         */
00066         void BuildProtocolDescriptionL(
00067             CSdpAttrValueDES* aProtocolDescriptor, TInt aPort );
00068 
00069 
00070         /**
00071         * ServiceClass()
00072         * @return the service class
00073         */
00074         TInt ServiceClass();
00075 
00076         /**
00077         * ServiceName()
00078         * @return the service name
00079         */
00080         const TDesC& ServiceName();
00081 
00082         /**
00083         * ServiceDescription()
00084         * @return the service description
00085         */
00086         const TDesC& ServiceDescription();
00087 
00088     private:    // Constructors
00089 
00090         /**
00091         * CChatServiceAdvertiser()
00092         * Constructs this object
00093         */
00094         CChatServiceAdvertiser();
00095 
00096         /**
00097         * ConstructL()
00098         * 2nd phase construction of this object
00099         */
00100         void ConstructL();
00101 
00102     private:    // data
00103 
00104         /**
00105         * iServiceName
00106         * Owned by CChatServiceAdvertiser
00107         */
00108         HBufC* iServiceName;
00109 
00110         /**
00111         * iServiceDescription
00112         * Owned by CChatServiceAdvertiser
00113         */
00114         HBufC* iServiceDescription;
00115     };
00116 
00117 #endif // CHATSERVICEADVERTISER_H
00118 
00119 // End of File

© Nokia 2006

Back to top