ImagePrint/ImagePrintEngine/DeviceProtocols/btprotocol/inc/cbtstatuschannel.h
branchRCL_3
changeset 21 d59c248c9d36
parent 0 d11fb78c4374
equal deleted inserted replaced
20:159fc2f68139 21:d59c248c9d36
       
     1 /*
       
     2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Defines the CBtStatusChannel class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CBTSTATUSCHANNEL_H
       
    20 #define CBTSTATUSCHANNEL_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <f32file.h>
       
    24 #include <e32math.h>
       
    25 #include <obex.h>
       
    26 
       
    27 #include "crsbtdiscoverengine.h"
       
    28 #include "tprintcapability.h"
       
    29 #include "cbtchannelbase.h"
       
    30 #include "mbtpcobserver.h"
       
    31 #include "cbtobjectserver.h"
       
    32 #include "cprintjob.h"
       
    33 
       
    34 /**
       
    35 * @class 	CBtStatusChannel
       
    36 * @brief
       
    37 *
       
    38 */
       
    39 NONSHARABLE_CLASS( CBtStatusChannel ) : public CBtChannelBase
       
    40 	{
       
    41 		public:
       
    42 
       
    43 			/**  		NewL
       
    44 			* @brief	Creates a new instance of XHTML file composer.
       
    45 			* @return	Pointer to the instance.
       
    46 			*/
       
    47 			static CBtStatusChannel* NewL(MBtPCObserver& aObs);
       
    48 
       
    49 			/**  		NewLC
       
    50 			* @brief	Creates a new instance of XHTML file composer and leaves it in the cleanup stack.
       
    51 			* @return	Pointer to the instance.
       
    52 			*/
       
    53 			static CBtStatusChannel* NewLC(MBtPCObserver& aObs);
       
    54 
       
    55 			/**  		~CBtStatusChannel
       
    56 			* @brief	Destructor.
       
    57 			*/
       
    58 			~CBtStatusChannel();
       
    59 
       
    60 			/**  		GetPrinterAttributesL
       
    61 			* @brief
       
    62 			*/
       
    63 			TInt GetPrinterStateL();
       
    64 
       
    65 			/**  		GetJobAttributes
       
    66 			* @brief
       
    67 			*/
       
    68 			TInt GetJobAttributesL(TInt aJobId);
       
    69 
       
    70 	        /**
       
    71 	        * Cancel a specified print job. Leaves if printer is invalid.
       
    72 	        * @since Series60 3.0
       
    73 	        * @param aPrinter Printer to be used. 
       
    74 	        * @param aJobId Print job ID of cancelled job.
       
    75 	        */
       
    76 			void GetEventL(TInt aJobId);
       
    77 
       
    78 		protected:
       
    79 
       
    80 			/**  		ConstructL
       
    81 			* @brief	Symbian second phase constructor.
       
    82 			*/
       
    83 			void ConstructL();
       
    84 
       
    85 			void RunL();
       
    86 			virtual void DoCancel();
       
    87 			TInt RunError(TInt aError);
       
    88 			
       
    89 		private:
       
    90 
       
    91 			/**  		CBtStatusChannel
       
    92 			* @brief	C++ constructor
       
    93 			*/
       
    94 			CBtStatusChannel(MBtPCObserver& aObs);
       
    95 			
       
    96 			void GetPrinterStateResponseL();
       
    97 			void GetJobAttributesResponseL();
       
    98 			void CancelJobResponseL();
       
    99 			void GetEventResponseL();
       
   100 
       
   101 			/**  		ConnectL
       
   102 			* @brief	Creates obex connection to the aBtDevice in the iClient 
       
   103 			*/
       
   104 			void ConnectL();
       
   105 
       
   106 			void DoLeaveL(TInt aError);
       
   107 			
       
   108 		private:
       
   109 
       
   110 	};
       
   111 
       
   112 #endif // CBTSTATUSCHANNEL_H
       
   113 
       
   114 //  End of File