ImagePrint/ImagePrintUI/imageprinteng/inc/mdiscovery.h
branchGCC_SURGE
changeset 25 59ea2209bb67
parent 23 08cc4cc059d4
parent 15 a92d00fca574
equal deleted inserted replaced
23:08cc4cc059d4 25:59ea2209bb67
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MDISCOVERY_H
       
    20 #define MDISCOVERY_H
       
    21 
       
    22 #include <e32def.h>
       
    23 
       
    24 class MDiscoveryObserver;
       
    25 
       
    26 /**
       
    27  *
       
    28  * Interface to use the device discovery functionality of Image Print Engine
       
    29  *
       
    30  */
       
    31 class MDiscovery
       
    32     {
       
    33 	public:		// Abstract methods
       
    34 
       
    35         /**
       
    36          *  Initializes and starts the device discovery. Engine notifies
       
    37          *  about the found devices through device observer interface.
       
    38          *  Asynchronous service.
       
    39          *
       
    40          *  @param aNotifier    an object that implements the observer IF
       
    41          *  @param aProtocol    Which protocol should be used in discovery,
       
    42          *                      zero if all of them
       
    43          */
       
    44         virtual void StartDeviceDiscoveryL( 
       
    45             MDiscoveryObserver* aNotifier, TUint aProtocol ) = 0;
       
    46 
       
    47         /**
       
    48          *  Returns supported protocols
       
    49          *  
       
    50          *  @return supported protocols
       
    51          */
       
    52         virtual TUint SupportedProtocols() = 0;
       
    53 
       
    54         /**
       
    55          *  Cancels the device discovery process. The discovery is cancelled
       
    56          *  and the observer receives error code KErrCancel.
       
    57          *  Asynchronous service.
       
    58          */
       
    59         virtual void CancelDeviceDiscoveryL() = 0;
       
    60 
       
    61         /**
       
    62          *  Chooses the printer based on its UID and locks it for the 
       
    63          *  application.
       
    64          *  Synchronous service.
       
    65          *
       
    66          *  @param aPrinterUid  Uid of the chosen printer 
       
    67          *  @return Boolean value. If ETrue, the search will continue (user
       
    68          *          has selected 'Wireless Printers' or such)
       
    69          */
       
    70         virtual TInt ChoosePrinterL( TInt aPrinterUid ) = 0;
       
    71         
       
    72         /**
       
    73          *  PictBridge USB mode checker
       
    74 		 *	@return TInt value more than 0, if PictBridge USB mode is on; 
       
    75 		 *          0 if off; negative value if error.
       
    76          */
       
    77         virtual TInt IsPictBridgeMode() = 0;
       
    78         
       
    79         /**
       
    80          * Removes the current discover observer.
       
    81          * Used for special cases where the observer object 
       
    82          * is destroyed while still being the current observer.
       
    83          */
       
    84         virtual void RemoveDiscoveryObserver() = 0;
       
    85     };
       
    86 
       
    87 #endif  //  MDISCOVERY_H
       
    88 
       
    89 //  End of File