zeroconf/server/inc/cqueryhandler.h
changeset 14 da856f45b798
equal deleted inserted replaced
12:78fbd574edf4 14:da856f45b798
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // cqueryhandler.h
       
    15 // 
       
    16 //
       
    17 /**
       
    18 @file
       
    19 @internalTechnology
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 #ifndef __CQUERYHANDLER_H__
       
    25 #define __CQUERYHANDLER_H__
       
    26 
       
    27 //User include
       
    28 #include "cmessagehandler.h"
       
    29 #include <mdns/cdnsmessage.h>
       
    30 #include "cbasehandler.h"
       
    31 #include "mmessagehandler.h"
       
    32 #include "mdnsdebug.h"
       
    33 /**
       
    34 Derived From CBaseHandler
       
    35 Used to process response packet read from the mdns port
       
    36 */
       
    37 class CQueryHandler : public CBaseHandler,public MMessageHandler
       
    38 	{
       
    39 	public :
       
    40 		static CQueryHandler* NewL(CMessageHandler& aMessageHandler);
       
    41 	 	~CQueryHandler();
       
    42 	 	
       
    43 	 	// Derived from CBaseHandler
       
    44 	 	void HandleIncomingPacketL(CDnsMessage& aMessage, const TSockAddr& aAddr);
       
    45 		void ServiceClientQueryL(CDnsMessage* aMessage,TInt aClientHandle);
       
    46 		void OnPacketSendL(TInt aError);
       
    47 		void SendQueryL(CDnsMessage* aMessage, MMessageHandler& aObserver);		
       
    48 	private:
       
    49 	    CQueryHandler(CMessageHandler& aMessageHandler);
       
    50 	    void ConstructL();
       
    51 	    TBool SuppressDuplicateAnswerL(const RPointerArray<CDnsResourceData>& aAnswers,const CDnsResourceData& aResourceData);
       
    52 	    void HandleAnyQuestionL(CDnsMessage* aPacket,const RPointerArray<CDnsResourceData>& aAnswers,const CCacheEntry& aEntry);
       
    53 	 	
       
    54 	 	void ScheduleOutStandingQueryL(TInt aClientHandle , TBool aTriggerNow, TTime aInTime);    
       
    55 	private	:
       
    56 		TInt iClientHandle;
       
    57 		/**
       
    58 		    *FLOGGER debug trace member variable.
       
    59 		    */
       
    60 		    __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    61 	};
       
    62 
       
    63 #endif
       
    64