mtpdataproviders/mtppictbridgedp/pictbridgeengine/inc/dpsparam.h
author hgs
Fri, 23 Jul 2010 18:35:35 +0800
changeset 35 c4c427c00f31
parent 29 3ae5cb0b4c02
permissions -rw-r--r--
201029_04
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     1
/*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     2
* Copyright (c) 2006, 2007 Nokia Corporation and/or its subsidiary(-ies).
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     3
* All rights reserved.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     8
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     9
* Initial Contributors:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    11
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    12
* Contributors:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    13
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    14
* Description:  These classes define the dps operation parameters. 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    15
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    16
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    17
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    18
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    19
#ifndef DPSPARAM_H
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    20
#define DPSPARAM_H
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    21
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    22
#include "dpsdefs.h"
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    23
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    24
enum TDpsSupportedOp
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    25
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    26
    EDpsEmptyRequest = 0,
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    27
    EDpsConfigPrintService,
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    28
    EDpsGetCapability,
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    29
    EDpsGetJobStatus,
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    30
    EDpsGetPrinterStatus,
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    31
    EDpsStartJob,
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    32
    EDpsAbortJob,
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    33
    EDpsContinueJob
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    34
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    35
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    36
struct TDpsArgsInt
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    37
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    38
    TDpsArgument 	iElement;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    39
    TUint32		iContent;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    40
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    41
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    42
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    43
*   The class defines the print job information which is needed by
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    44
*   startJob operation
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    45
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    46
NONSHARABLE_CLASS(TDpsPrintInfo)
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    47
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    48
public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    49
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    50
    *
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    51
    */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    52
    inline TDpsPrintInfo();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    53
    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    54
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    55
    *   Resets all parameters
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    56
    */    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    57
    IMPORT_C  void Reset();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    58
    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    59
    // the file name        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    60
    TBuf<KMaxArgLen> iFile; 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    61
               
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    62
    TBool isDPOF;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    63
    // this is 0 when UI passed it to dps. Dps engine must find the ID
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    64
    // for this file by asking ptp server
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    65
    TUint32 iFileID; 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    66
    // if don't need to print file name, this is EFalse
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    67
    TBool iFileName;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    68
    // if don't need to print date, this is empty
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    69
    TBuf<KDateLen> iDate;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    70
    // if only one cope, this is emtpy
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    71
    TInt iCopies;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    72
    // if not DPOF, this is emtpy
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    73
    TInt iPrtPID;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    74
    // if not DPOF, this is emtpy
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    75
    TInt iCopyID;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    76
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    77
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    78
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    79
*   Dps version defination
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    80
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    81
NONSHARABLE_CLASS(TDpsVersion)
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    82
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    83
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    84
        TInt iMajor;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    85
        TInt iMinor;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    86
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    87
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    88
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    89
*   AbortJob request
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    90
*/	
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    91
NONSHARABLE_CLASS(TDpsAbortJobReq)
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    92
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    93
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    94
        TInt iAbortStyle;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    95
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    96
    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    97
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    98
*   ConfigurePrintService request
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    99
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   100
class TDpsConfigPrintReq
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   101
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   102
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   103
        RArray<TDpsVersion> iDpsVersions;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   104
        TBuf8<KMaxArgLen> iVendorName;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   105
        TDpsVersion iVendorVersion;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   106
        TBuf8<KMaxArgLen> iProductName;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   107
        TBuf8<KMaxArgLen> iSerialNo;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   108
        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   109
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   110
        *   Destructor. Declared as virtual so that it will be called by 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   111
        *   its derived class.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   112
        */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   113
        inline virtual ~TDpsConfigPrintReq();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   114
        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   115
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   116
        *   Resets all class variables.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   117
        */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   118
        inline void Reset();        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   119
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   120
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   121
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   122
*   ConfigurePrintService reply
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   123
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   124
NONSHARABLE_CLASS(TDpsConfigPrintRep) : public TDpsConfigPrintReq
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   125
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   126
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   127
        TInt iPrintAvailable;      
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   128
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   129
    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   130
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   131
*	GetCapability request.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   132
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   133
NONSHARABLE_CLASS(TDpsCapReq)
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   134
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   135
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   136
        TDpsArgument iCap;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   137
        // layouts and paperTypes requests attributes
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   138
        TDpsAttribute iAttribute;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   139
    };	
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   140
	    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   141
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   142
*   GetCapability reply
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   143
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   144
NONSHARABLE_CLASS(TDpsCapRep) : public TDpsCapReq
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   145
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   146
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   147
        RArray<TUint> iContent;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   148
        RArray<TDpsPaperType> iPaperType;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   149
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   150
        *   Destructor
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   151
        */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   152
        inline ~TDpsCapRep();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   153
        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   154
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   155
        *   Resets all class variables
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   156
        */ 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   157
        inline void Reset();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   158
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   159
                                	
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   160
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   161
*	StartJob request has printInfo and jobConfig parameters.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   162
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   163
NONSHARABLE_CLASS(TDpsStartJobReq)
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   164
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   165
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   166
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   167
	    *   Resets all member variables
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   168
        */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   169
        inline void Reset();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   170
	    	        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   171
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   172
        *   Gets the number of all parameters, including ones under elements
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   173
        *   @return the number of parameters
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   174
        */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   175
        IMPORT_C TInt GetParamNum();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   176
		
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   177
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   178
        *   Destructor
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   179
        */    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   180
        inline ~TDpsStartJobReq(); 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   181
        RArray<TDpsArgsInt> iJobConfig;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   182
        //there might be multiple printInfo in case of several pictures are 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   183
        //selected to be printed 
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   184
        RArray<TDpsPrintInfo> iPrintInfo;		
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   185
    };	
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   186
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   187
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   188
*   This class is for job status reply
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   189
*/	
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   190
NONSHARABLE_CLASS(TDpsJobStatusRep)
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   191
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   192
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   193
        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   194
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   195
        *   
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   196
        */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   197
        inline TDpsJobStatusRep();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   198
        /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   199
        *   Resets all memeber variables
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   200
        */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   201
        IMPORT_C void Reset();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   202
        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   203
        TInt iProgress;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   204
        TInt iImagesPrinted;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   205
        TFileName iFilePath;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   206
        TInt iPrtPID;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   207
        TInt iCopyID;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   208
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   209
    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   210
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   211
*   This class is for device status reply
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   212
*/    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   213
NONSHARABLE_CLASS(TDpsPrinterStatusRep)
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   214
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   215
    public:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   216
        TDpsPrintServiceStatus iPrintStatus;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   217
        TDpsJobStatus iJobStatus;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   218
        TDpsErrorStatus iErrorStatus;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   219
        TDpsJobEndReason iJobEndReason;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   220
        TBool iDisconnectEnable;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   221
        TBool iCapabilityChange;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   222
        TBool  iNewJobOk;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   223
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   224
#include "dpsparam.inl"    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
   225
#endif