messagingfw/wappushfw/pushwatcher/inc/pushwatcher.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2000-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 //
       
    15 
       
    16 
       
    17 #include <push/pushlog.h>
       
    18 #include "ConnMan.h"
       
    19 
       
    20 
       
    21 // Classes referenced
       
    22 class RFs;
       
    23 class CWatcherLog;
       
    24 
       
    25 
       
    26 /** 
       
    27  * Real watcher
       
    28  * A watcher interface conformant class which has one NewL export called by 
       
    29  * the watcher framework to create the watcher. It creates the connection
       
    30  * manager and provides an adapter for our logging interface (MWapPushLog) 
       
    31  * to the log provided by the watcher framework
       
    32  */
       
    33 
       
    34 //##ModelId=3B659E6F0105
       
    35 class CPushWatcher : public CActive, public MWapPushLog
       
    36 /**
       
    37 @internalTechnology
       
    38 @released
       
    39 */
       
    40 	{
       
    41 public:
       
    42 #ifdef __WATCHER_API_V2__
       
    43 	static CPushWatcher* NewL(TAny* aWatcherParams);
       
    44 #else
       
    45 	// Watcher Plugin Signature
       
    46 	//##ModelId=3B659E6F0156
       
    47 	IMPORT_C static CPushWatcher* NewL(RFs& aFs, CWatcherLog& aLog);
       
    48 #endif	// __WATCHER_API_V2__
       
    49 	//##ModelId=3B659E6F0155
       
    50 	~CPushWatcher();
       
    51 
       
    52 	// from MWapPushLog
       
    53 	//##ModelId=3B659E6F014B
       
    54 	virtual void WPLPrintf(const TDesC& aDescription);
       
    55 	//##ModelId=3B659E6F014D
       
    56 	virtual void WPLPrintf(CPushMessage& aMessage);
       
    57 	//##ModelId=3B659E6F0142
       
    58 	virtual void WPLLogBinaryAsHex(const TDesC& aDescription);
       
    59 	//##ModelId=3B659E6F0138
       
    60 	virtual void WPLLogError(const TDesC& aDescription,TInt aError);
       
    61 private:
       
    62 	//##ModelId=3B659E6F012F
       
    63 	CPushWatcher(TInt aPriority, CWatcherLog& aLog);
       
    64 	//##ModelId=3B659E6F012E
       
    65 	void ConstructL();
       
    66 	
       
    67 	//from CActive
       
    68 	//##ModelId=3B659E6F012D
       
    69 	void RunL();
       
    70 	//##ModelId=3B659E6F0126
       
    71 	void DoCancel();
       
    72 	void WPLPrintfL(CPushMessage& aMessage);
       
    73 
       
    74 private:
       
    75 	//##ModelId=3B659E6F0123
       
    76 	CWatcherLog& iLog;
       
    77 	//##ModelId=3B659E6F0113
       
    78 	CConnectionManager* iConnMan;
       
    79 	}; 
       
    80