diff -r 78fbd574edf4 -r da856f45b798 zeroconf/server/inc/cadvertizehandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zeroconf/server/inc/cadvertizehandler.h Thu Jun 24 19:09:47 2010 +0530 @@ -0,0 +1,75 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +/** +@file +@internalTechnology +*/ + +#ifndef __CADVERTIZEHANDLER_H__ +#define __CADVERTIZEHANDLER_H__ + +//User include +#include "cmessagehandler.h" +#include +#include "cbasehandler.h" +#include "cmdnsprobemanager.h" +#include "mmessagehandler.h" +#include "mdnsdebug.h" + +class CAdvertizeHandler : public CBaseHandler ,public MMessageHandler + { + public: + static CAdvertizeHandler* NewL(CMessageHandler& aMessageHandler,TBool aAutoResolveEnabled = ETrue); + ~CAdvertizeHandler(); + void HandleIncomingPacketL(CDnsMessage& aMessage); + void AdvertizePacketL(const RPointerArray aData, TInt aSessionId, TBool aIsUpdate); + void SetAutoResolve(TBool aFlag); + //From MMessageHandler + void OnPacketSendL(TInt aError); + private: + CAdvertizeHandler(CMessageHandler& aMessageHandler,TBool aAutoResolveEnabled); + void ConstructL(); + void RunL(); + TInt RunError(TInt aError); + void Schedule(); + TInt GenerateNonConflictingName(); + TBool DefensiveResponseL(); + void SendAnnouncementL(); + void InsertInCache(); + void SendProbeL(TBool aUnicast); + void ChangeDomainL(TDesC8& aName); + private: + RBuf8 iName; + TBool iAutoResolveEnabled; + TProbeStates iCurrentProbeState; + TConflictResolveState iConflict; + TInt iProbeCounter; + RPointerArray iData; + RBuf8 iProbeName; + RBuf8 iProbeType; + TInt iSessionId; + /** + FLOGGER debug trace member variable. + */ + __FLOG_DECLARATION_MEMBER_MUTABLE; + }; + + + +#endif //__CADVERTIZEHANDLER_H__