ImagePrint/ImagePrintUI/imageprinteng/inc/mprintsettings.h
branchRCL_3
changeset 27 159fc2f68139
parent 21 26673e532f65
child 28 d59c248c9d36
equal deleted inserted replaced
21:26673e532f65 27:159fc2f68139
     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 MPRINTSETTINGS_H
       
    20 #define MPRINTSETTINGS_H
       
    21 
       
    22 #include <e32def.h>
       
    23 #include <e32std.h>
       
    24 
       
    25 class CTemplateSettings;
       
    26 class CPrintSettings;
       
    27 class CBaseCapability;
       
    28 
       
    29 /**
       
    30  *
       
    31  * Interface to use the device discovery functionality of Image Print Engine
       
    32  *
       
    33  */
       
    34 class MPrintSettings
       
    35     {
       
    36     public:     // Abstract methods
       
    37 
       
    38         /**
       
    39          *  Fetches the available template icons and UIDs associated to
       
    40          *  the selected. Leaves on error.
       
    41          *  Synchonours
       
    42          *
       
    43          *  @return The current settings, ownership is transferred
       
    44          */
       
    45         virtual CTemplateSettings* TemplateSettingsL() = 0;
       
    46 
       
    47         /**
       
    48          *  Sets the active UID. If this succeeds, the preview bitmap
       
    49          *  needs to be updated on UI. Also the amount of pages need
       
    50          *  to be queried again.
       
    51          *  Synchronous
       
    52          *
       
    53          *  @param aUid Uid of the activated template
       
    54          */
       
    55         virtual void SetActiveTemplateL( TUint aUid ) = 0;
       
    56 
       
    57         /**
       
    58          *  Returns the number of pages with the current template/image
       
    59          *  selection.
       
    60          *  Synchronous
       
    61          *
       
    62          *  @return Number of pages
       
    63          */
       
    64         virtual TUint NumOfPagesL() = 0;
       
    65 
       
    66         /**
       
    67          *  Returns the number of copies value
       
    68          *  Synchronous
       
    69          *
       
    70          *  @return Number of Copies
       
    71          */
       
    72         virtual TInt NumberOfCopies( RArray<TInt>& aArray ) = 0;
       
    73 
       
    74         /**
       
    75          *  Returns the number of copies value
       
    76          *  Synchronous
       
    77          *
       
    78          *  @return Number of Copies
       
    79          */
       
    80         virtual TInt NumberOfCopies( TInt& aNumberOfCopies, TInt aIndex ) = 0;
       
    81 
       
    82         /**
       
    83          *  Sets the number of copies value for each image
       
    84          *  Synchronous
       
    85          */
       
    86         virtual TInt SetNumberOfCopiesL( const RArray<TInt>& aArray ) = 0;
       
    87 
       
    88         virtual TInt UpdateNumberOfCopiesToServer() = 0;
       
    89 
       
    90         /**
       
    91          *  Checks if the user has selected MMC printing
       
    92          *  Synchronous
       
    93          *
       
    94          *  @return Boolean value to match
       
    95          */
       
    96         virtual TBool IsMMC() = 0;
       
    97 
       
    98         /**
       
    99          *  Sets the active preview page on display. If this succeeds, the
       
   100          *  preview bitmap needs to be updated on UI,
       
   101          *  Synchronous
       
   102          *
       
   103          *  @param aActivePage New active page
       
   104          */
       
   105         virtual void SetActivePageL( TUint aActivePage ) = 0;
       
   106 
       
   107         /**
       
   108          *  Returns current active page
       
   109          *  Synchronous
       
   110          *
       
   111          *  @return Current active page
       
   112          */
       
   113         virtual TUint CurActivePageL() = 0;
       
   114 
       
   115         /**
       
   116          *  Fetch printer capabilities and current settings
       
   117          *  Synchronous
       
   118          *
       
   119          *  @return Printer's capabilities, ownership changes
       
   120          */
       
   121         virtual CPrintSettings* PrinterSettingsL() = 0;
       
   122 
       
   123         /**
       
   124          *  Sets new settings for the print job
       
   125          *  Synchronous
       
   126          *
       
   127          *  @param  aSettings   New set of settings
       
   128          */
       
   129         virtual void SetPrinterSettingsL( CPrintSettings& aSettings ) = 0;
       
   130 
       
   131         /**
       
   132          *  Sets a single setting for the print job
       
   133          *  Synchronous
       
   134          *
       
   135          *  @param aCapab   Capability to be changed
       
   136          *  @return If return value == 0 then new settings should be
       
   137          *          fetched using PrinterSettingsL() and the UI must
       
   138          *          be updated
       
   139          */
       
   140         virtual TInt SetPrinterSettingL( CBaseCapability& aCapab ) = 0;
       
   141 
       
   142        /**
       
   143         * Returns the UID of the currently selected template
       
   144         *
       
   145         * @return Tint UID
       
   146         */
       
   147         virtual TInt TemplateUid() = 0;
       
   148 
       
   149         // Called when template OR current image is changed
       
   150         virtual TBool UpdatePageNumberL( TInt aCurrentImage ) = 0;
       
   151         virtual TInt PrinterUid() = 0;
       
   152 
       
   153         /**
       
   154          * Sets the current usb connection state
       
   155          *
       
   156          * @param aConnected   Connection state
       
   157          */
       
   158         virtual void SetUsbState( TBool aConnected ) = 0;
       
   159 
       
   160         /**
       
   161          * Gets the current usb connection state
       
   162          *
       
   163          * @return  Connection state
       
   164          */
       
   165         virtual TBool GetUsbState() = 0;
       
   166 
       
   167         /**
       
   168           *  Default printer protocol getter
       
   169           *  @return protocol number or KErrNotFound
       
   170           */
       
   171         virtual TInt GetDefaultPrinterProtocol() = 0;
       
   172 
       
   173          /**
       
   174           *  Default printer protocol setter
       
   175           *  @param aProtocol protocol number
       
   176           *  @return error code, KErrNone if OK
       
   177           */
       
   178         virtual TInt SetDefaultPrinterProtocol( TInt aProtocol ) = 0;
       
   179 
       
   180          /**
       
   181           *  Current printer protocol getter
       
   182           *  @return protocol number or KErrNotFound
       
   183           */
       
   184         virtual TInt GetCurrentPrinterProtocol() = 0;
       
   185 
       
   186          /**
       
   187           *  Current printer protocol setter
       
   188           *  @param aProtocol protocol number
       
   189           *  @return error code, KErrNone if OK
       
   190           */
       
   191         virtual void SetCurrentPrinterProtocol( TInt aProtocol ) = 0;
       
   192 
       
   193          /**
       
   194           *  Current printer brand getter
       
   195           *  @return current printer brand id
       
   196           */
       
   197         virtual TUint GetCurrentPrinterVendor() = 0;
       
   198 
       
   199          /**
       
   200           *  Current printer brand setter
       
   201           *  @param aVendor printer brand
       
   202           */
       
   203         virtual void SetCurrentPrinterVendor( TUint aVendor ) = 0;
       
   204 
       
   205          /**
       
   206           *  Default printer id getter
       
   207           *  @return printer id or KErrNotFound
       
   208           */
       
   209         virtual TInt GetDefaultPrintID() = 0;
       
   210 
       
   211         /**
       
   212           *  Default printer protocol setter
       
   213           *  @param aId printer id
       
   214           *  @return error code, KErrNone if OK
       
   215           */
       
   216         virtual TInt SetDefaultPrinterID( TInt aId ) = 0;
       
   217 
       
   218         /**
       
   219           *  Default printer name getter
       
   220           *  @return printer name
       
   221           */
       
   222         virtual HBufC* GetDefaultPrinterNameLC() = 0;
       
   223 
       
   224         /**
       
   225           *  Default printer name setter
       
   226           *  @param aPrinterName printer name
       
   227           *  @return error code, KErrNone if OK
       
   228           */
       
   229         virtual TInt SetDefaultPrinterNameL( const TDesC& aPrinterName ) = 0;
       
   230 
       
   231          /**
       
   232           *  Current printer name getter
       
   233           *  @return printer name
       
   234           */
       
   235         virtual HBufC* GetCurrentPrinterName() = 0;
       
   236 
       
   237         /**
       
   238           *  Current printer name setter
       
   239           *  @param aPrinterName printer name
       
   240           *  @return error code, KErrNone if OK
       
   241           */
       
   242         virtual TInt SetCurrentPrinterName( const TDesC& aPrinterName ) = 0;
       
   243 
       
   244         /**
       
   245           * Current paper size text getter
       
   246           * @Return paper size text
       
   247           */
       
   248         virtual HBufC* GetCurrentPaperSizeTextL() = 0;
       
   249 
       
   250     };
       
   251 
       
   252 #endif //  MPRINTSETTINGS_H
       
   253 
       
   254 //  End of File