DirectPrint/DirectPrintClient/src/directprintclient.cpp
author msekine <m.sekine@kthree.co.jp>
Wed, 31 Mar 2010 00:04:55 +0900
branchRCL_3
changeset 11 613a5ff70823
child 19 2275db202402
permissions -rw-r--r--
transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     1
/*
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     2
* Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     3
* All rights reserved.
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     8
*
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
     9
* Initial Contributors:
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    10
* Kanrikogaku Kenkyusho, Ltd. - Initial contribution
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    11
*
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    12
* Contributors:
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    13
*
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    14
* Description:  
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    15
*
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    16
*/
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    17
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    18
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    19
#include <e32svr.h>
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    20
#include <e32math.h>
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    21
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    22
#include "directprintclient.h"
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    23
#include "directprintclientserver.h"
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    24
#include "directprintcapability.h"
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    25
#include "clog.h"
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    26
#include "directprintjobguarddata.h"
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    27
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    28
namespace
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    29
	{	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    30
	// Server startup code
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    31
	TInt StartServer()
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    32
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    33
		// EPOC and EKA2 is easy, we just create a new server process. Simultaneous
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    34
		// launching of two such processes should be detected when the second one
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    35
		// attempts to create the server object, failing with KErrAlreadyExists.
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    36
		RProcess server;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    37
		TInt r = server.Create( KDirectPrintServerImg, KNullDesC );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    38
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    39
		if( r != KErrNone )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    40
			return r;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    41
		TRequestStatus stat;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    42
		server.Rendezvous(stat);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    43
		if (stat!=KRequestPending)
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    44
			server.Kill(0);		// abort startup
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    45
		else
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    46
			server.Resume();	// logon OK - start the server
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    47
		User::WaitForRequest(stat);		// wait for start or death
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    48
		// we can't use the 'exit reason' if the server panicked as this
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    49
		// is the panic 'reason' and may be '0' which cannot be distinguished
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    50
		// from KErrNone
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    51
		r=(server.ExitType()==EExitPanic) ? KErrGeneral : stat.Int();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    52
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    53
		server.Close();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    54
		return r;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    55
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    56
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    57
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    58
TVersion RDirectPrintClient::Version() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    59
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    60
	return TVersion( KDirectPrintServerMajor, KDirectPrintServerMinor, KDirectPrintServerBuild );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    61
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    62
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    63
EXPORT_C RDirectPrintClient::RDirectPrintClient()
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    64
	: RSessionBase()
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    65
	, iDicsoveryDataPtr(NULL, 0, 0)
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    66
	, iIdleDataPtr(NULL, 0, 0)
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    67
	, iJobDataPtr(NULL, 0, 0)
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    68
	, iNameDataPtr(NULL, 0, 0)
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    69
    {
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    70
    iCapability = NULL;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    71
    }
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    72
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    73
EXPORT_C void RDirectPrintClient::ConnectL()
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    74
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    75
	LOG1("RDirectPrintClient::Connect Handle(): %d", Handle());
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    76
	// check against double-connect
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    77
	if( Handle() != KNullHandle )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    78
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    79
		User::Leave(KErrAlreadyExists);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    80
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    81
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    82
	iCapability = new (ELeave) TDirectPrintCapability();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    83
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    84
	// create process
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    85
	TInt err = StartServer();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    86
	if (err == KErrNone)
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    87
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    88
		// create session
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    89
		err = CreateSession( KDirectPrintServerName, Version() );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    90
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    91
	User::LeaveIfError(err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    92
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    93
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    94
EXPORT_C void RDirectPrintClient::Close()
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    95
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    96
	LOG("RDirectPrintClient::Close begin");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    97
	if( iCapability )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    98
		{		
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
    99
		delete iCapability;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   100
		iCapability = NULL;	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   101
		}	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   102
	RSessionBase::Close();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   103
	LOG("RDirectPrintClient::Close end");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   104
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   105
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   106
EXPORT_C TInt RDirectPrintClient::CountConnections( TInt& aConnections ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   107
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   108
	TPckg<TInt> connsBuf( aConnections );	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   109
	return SendReceive( ECountConnections, TIpcArgs( &connsBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   110
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   111
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   112
EXPORT_C TInt RDirectPrintClient::SetForeground( TInt aFg ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   113
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   114
	return SendReceive( ESetForeground, TIpcArgs( aFg ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   115
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   116
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   117
EXPORT_C TInt RDirectPrintClient::ReserveEngine() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   118
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   119
	return SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   120
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   121
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   122
EXPORT_C TInt RDirectPrintClient::ReleaseEngine() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   123
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   124
	return SendReceive( EReleaseEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   125
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   126
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   127
EXPORT_C TInt RDirectPrintClient::SupportedProtocols() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   128
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   129
	LOG("RDirectPrintClient::SupportedProtocols ESupportedProtocols");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   130
	TInt prots = SendReceive( ESupportedProtocols );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   131
	LOG1("RDirectPrintClient::SupportedProtocols end with: %d", prots);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   132
	return prots;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   133
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   134
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   135
EXPORT_C TInt RDirectPrintClient::GetNumPrintPages() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   136
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   137
	LOG("RDirectPrintClient::GetNumPrintPages EGetNumPrintPages");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   138
	TInt pages = SendReceive( EGetNumPrintPages );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   139
	LOG1("RDirectPrintClient::GetNumPrintPages end with: %d", pages);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   140
	return pages;	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   141
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   142
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   143
EXPORT_C TInt RDirectPrintClient::GetJobStatus() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   144
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   145
	LOG("RDirectPrintClient::GetJobStatus EGetJobStatus");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   146
	TInt status = SendReceive( EGetJobStatus );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   147
	LOG1("RDirectPrintClient::GetJobStatus end with: %d", status);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   148
	return status;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   149
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   150
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   151
EXPORT_C TInt RDirectPrintClient::GetPrinterStatus( TInt aPrinterID ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   152
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   153
	LOG1("RDirectPrintClient::GetPrinterStatus EGetPrinterStatus aPrinterID: %d", aPrinterID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   154
	TInt status = SendReceive( EGetPrinterStatus, TIpcArgs( aPrinterID ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   155
	LOG1("RDirectPrintClient::GetPrinterStatus end with: %d", status);	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   156
	return status;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   157
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   158
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   159
EXPORT_C TInt RDirectPrintClient::CancelDiscovery() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   160
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   161
	LOG("RDirectPrintClient::CancelDiscovery ECancelDiscovery");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   162
	TInt err = SendReceive( ECancelDiscovery );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   163
	LOG1("RDirectPrintClient::CancelDiscovery end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   164
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   165
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   166
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   167
EXPORT_C TInt RDirectPrintClient::SubmitPrintJob() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   168
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   169
	LOG("RDirectPrintClient::SubmitPrintJob ESubmitPrintJob");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   170
	TInt err = SendReceive( ESubmitPrintJob );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   171
	LOG1("RDirectPrintClient::SubmitPrintJob end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   172
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   173
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   174
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   175
EXPORT_C TInt RDirectPrintClient::CancelPrintJob() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   176
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   177
	LOG("RDirectPrintClient::CancelPrintJob ECancelPrintJob");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   178
	TInt err = SendReceive( ECancelPrintJob );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   179
	LOG1("RDirectPrintClient::CancelPrintJob end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   180
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   181
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   182
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   183
EXPORT_C TInt RDirectPrintClient::ContinuePrintJob() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   184
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   185
	LOG("RDirectPrintClient::ContinuePrintJob EContinuePrintJob");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   186
	TInt err = SendReceive( EContinuePrintJob );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   187
	LOG1("RDirectPrintClient::ContinuePrintJob end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   188
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   189
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   190
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   191
EXPORT_C TInt RDirectPrintClient::RemoveCachedPrinter( TInt aPrinterID ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   192
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   193
	LOG1("RDirectPrintClient::RemoveCachedPrinter ERemoveCachedPrinter aPrinterID: %d", aPrinterID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   194
	TInt err = SendReceive( ERemoveCachedPrinter, TIpcArgs( aPrinterID ) );	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   195
	LOG1("RDirectPrintClient::RemoveCachedPrinter end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   196
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   197
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   198
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   199
EXPORT_C TInt RDirectPrintClient::GetJobTemplateIcon( TInt aTemplateID, TInt& aFbsBitmapHandle ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   200
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   201
	TPckg<TInt> handleBuf( aFbsBitmapHandle );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   202
	LOG1("RDirectPrintClient::GetJobTemplateIcon EGetJobTemplateIcon aTemplateID: %d", aTemplateID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   203
	TInt err = SendReceive( EGetJobTemplateIcon, TIpcArgs( aTemplateID, &handleBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   204
	LOG1("RDirectPrintClient::GetJobTemplateIcon aFbsBitmapHandle: %d", aFbsBitmapHandle);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   205
	LOG1("RDirectPrintClient::GetJobTemplateIcon end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   206
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   207
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   208
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   209
EXPORT_C TInt RDirectPrintClient::GetNumPreviewPages() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   210
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   211
	LOG("RDirectPrintClient::GetNumPreviewPages EGetNumPreviewPages");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   212
	TInt pages = SendReceive( EGetNumPreviewPages );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   213
	LOG1("RDirectPrintClient::GetNumPreviewPages end with: %d", pages);	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   214
	return pages;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   215
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   216
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   217
EXPORT_C TInt RDirectPrintClient::SetJobSetting( TInt aCapabilityID, TInt aValue, TInt& aAffectedCapability ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   218
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   219
	TPckg<TInt> capBuf( aAffectedCapability );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   220
	LOG1("RDirectPrintClient::SetJobSetting ESetJobSetting aCapabilityID: %d", aCapabilityID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   221
	LOG1("RDirectPrintClient::SetJobSetting ESetJobSetting aValue: %d", aValue);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   222
	TInt err = SendReceive( ESetJobSetting, TIpcArgs( aCapabilityID, aValue, &capBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   223
	LOG1("RDirectPrintClient::SetJobSetting aAffectedCapability: %d", aAffectedCapability);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   224
	LOG1("RDirectPrintClient::SetJobSetting end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   225
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   226
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   227
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   228
EXPORT_C TInt RDirectPrintClient::GetJobSetting( TInt aCapabilityID, TInt& aValue ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   229
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   230
	TPckg<TInt> valueBuf( aValue );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   231
	LOG1("RDirectPrintClient::GetJobSetting EGetJobSetting aCapabilityID: %d", aCapabilityID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   232
	TInt err = SendReceive( EGetJobSetting, TIpcArgs( aCapabilityID, &valueBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   233
	LOG1("RDirectPrintClient::GetJobSetting aValue: %d", aValue);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   234
	LOG1("RDirectPrintClient::GetJobSetting end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   235
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   236
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   237
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   238
EXPORT_C TInt RDirectPrintClient::GetPrinterCapability(TInt aPrinterID, TInt aCapabilityID, TDirectPrintCapability& aCapability) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   239
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   240
	LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapability aPrinterID: %d", aPrinterID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   241
	LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapability aCapabilityID: %d", aCapabilityID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   242
	TInt err = SendReceive( EGetPrinterCapability, TIpcArgs( aPrinterID, aCapabilityID ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   243
	LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapability err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   244
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   245
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   246
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   247
		TInt capId;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   248
		TPckg<TInt> capIdBuf( capId );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   249
		LOG("RDirectPrintClient::GetPrinterCapability EGetPrinterCapId");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   250
		err = SendReceive( EGetPrinterCapId, TIpcArgs( &capIdBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   251
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapId err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   252
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapId capId: %d", capId);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   253
		if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   254
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   255
			iCapability->iCapabilityID = capId;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   256
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   257
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   258
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   259
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   260
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   261
		TInt type;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   262
		TPckg<TInt> typeBuf( type );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   263
		LOG("RDirectPrintClient::GetPrinterCapability EGetPrinterCapType");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   264
		err = SendReceive( EGetPrinterCapType, TIpcArgs( &typeBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   265
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapType err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   266
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapType type: %d", type);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   267
		if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   268
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   269
			iCapability->iType = static_cast<TDirectPrintCapability::ECapType>(type);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   270
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   271
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   272
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   273
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   274
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   275
		TInt def;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   276
		TPckg<TInt> defBuf( def );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   277
		LOG("RDirectPrintClient::GetPrinterCapability EGetPrinterCapDef");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   278
		err = SendReceive( EGetPrinterCapDef, TIpcArgs( &defBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   279
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapDef err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   280
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapDef def: %d", def);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   281
		if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   282
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   283
			iCapability->iDefaultValue = def;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   284
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   285
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   286
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   287
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   288
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   289
		TInt low;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   290
		TPckg<TInt> lowBuf( low );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   291
		LOG("RDirectPrintClient::GetPrinterCapability EGetPrinterCapLow");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   292
		err = SendReceive( EGetPrinterCapLow, TIpcArgs( &lowBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   293
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapLow err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   294
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapLow low: %d", low);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   295
		if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   296
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   297
			iCapability->iLow = low;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   298
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   299
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   300
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   301
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   302
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   303
		TInt high;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   304
		TPckg<TInt> highBuf( high );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   305
		LOG("RDirectPrintClient::GetPrinterCapability EGetPrinterCapHigh");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   306
		err = SendReceive( EGetPrinterCapHigh, TIpcArgs( &highBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   307
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapHigh err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   308
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapHigh high: %d", high);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   309
		if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   310
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   311
			iCapability->iHigh = high;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   312
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   313
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   314
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   315
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   316
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   317
		TInt count;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   318
		TPckg<TInt> countBuf( count );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   319
		LOG("RDirectPrintClient::GetPrinterCapability EGetPrinterCapEnumCount");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   320
		err = SendReceive( EGetPrinterCapEnumCount, TIpcArgs( &countBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   321
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapEnumCount err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   322
		LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapEnumCount count: %d", count);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   323
		
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   324
		if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   325
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   326
			iCapability->iEnumCount = count;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   327
			for( TInt i = 0; i < count && ! err; i++ )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   328
				{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   329
				TInt value;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   330
				TPckg<TInt> valueBuf( value );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   331
				LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapEnum i: %d",i);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   332
				TInt err = SendReceive( EGetPrinterCapEnum, TIpcArgs( i, &valueBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   333
				LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapEnum err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   334
				LOG1("RDirectPrintClient::GetPrinterCapability EGetPrinterCapEnum value: %d", value);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   335
				
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   336
				if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   337
					{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   338
					iCapability->iEnumCodes[i] = value;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   339
					}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   340
				}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   341
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   342
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   343
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   344
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   345
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   346
		aCapability	= *iCapability;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   347
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   348
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   349
	LOG1("RDirectPrintClient::GetPrinterCapability end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   350
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   351
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   352
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   353
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   354
EXPORT_C TInt RDirectPrintClient::GetPrinterCapabilityIDs( TInt aPrinterID, RArray<TInt>& aCapabilityIDs ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   355
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   356
	TInt count;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   357
	TPckg<TInt> countBuf( count );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   358
	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   359
	LOG1("RDirectPrintClient::GetPrinterCapabilityIDs EGetPrinterCapabilityIDsCount aPrinterID: %d", aPrinterID);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   360
	TInt err = SendReceive( EGetPrinterCapabilityIDsCount, TIpcArgs( aPrinterID, &countBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   361
	LOG1("RDirectPrintClient::GetPrinterCapabilityIDs EGetPrinterCapabilityIDsCount err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   362
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   363
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   364
		LOG1("RDirectPrintClient::GetPrinterCapabilityIDs EGetPrinterCapabilityIDsCount count: %d", count);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   365
		for( TInt i = 0; i < count && !err; i++ )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   366
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   367
			TInt capability;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   368
			TPckg<TInt> capBuf( capability );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   369
			LOG1("RDirectPrintClient::GetPrinterCapabilityIDs EGetPrinterCapabilityID i: %d", i);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   370
			err = SendReceive( EGetPrinterCapabilityID, TIpcArgs( i, &capBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   371
			LOG1("RDirectPrintClient::GetPrinterCapabilityIDs EGetPrinterCapabilityID err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   372
			if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   373
				{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   374
				LOG1("RDirectPrintClient::GetPrinterCapabilityIDs capability id: %d", capability);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   375
				err = aCapabilityIDs.Append( capability );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   376
				LOG1("RDirectPrintClient::GetPrinterCapabilityIDs append err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   377
				}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   378
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   379
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   380
	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   381
	LOG1("RDirectPrintClient::GetPrinterCapabilityIDs end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   382
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   383
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   384
/*
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   385
EXPORT_C TInt RDirectPrintClient::RegisterIdleObserver( TIdleGuardData& aData, TRequestStatus& aStatus )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   386
	{ 
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   387
	LOG("RDirectPrintClient::RegisterIdleObserver EReserveEngine");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   388
	TInt err = SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   389
	LOG1("RDirectPrintClient::RegisterIdleObserver EReserveEngine err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   390
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   391
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   392
		LOG("RDirectPrintClient::RegisterIdleObserver ERegisterIdleObserver");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   393
		iIdleDataPtr.Set(reinterpret_cast<TUint8*>(&aData), sizeof(aData), sizeof(aData));
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   394
		SendReceive( ERegisterIdleObserver, TIpcArgs( &iIdleDataPtr ), aStatus );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   395
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   396
	LOG1("RDirectPrintClient::RegisterIdleObserver end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   397
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   398
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   399
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   400
EXPORT_C TInt RDirectPrintClient::CancelRegisterIdleObserver() const 
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   401
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   402
	LOG("RDirectPrintClient::CancelRegisterIdleObserver ECancelRegisterIdleObserver");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   403
	TInt err = SendReceive( EReleaseEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   404
	LOG1("RDirectPrintClient::RegisterIdleObserver EReleaseEngine err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   405
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   406
	err = SendReceive( ECancelRegisterIdleObserver );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   407
	LOG1("RDirectPrintClient::RegisterIdleObserver ECancelRegisterIdleObserver err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   408
	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   409
	LOG1("RDirectPrintClient::CancelRegisterIdleObserver end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   410
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   411
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   412
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   413
EXPORT_C TInt RDirectPrintClient::StartDiscovery( TDiscoveryGuardData& aData, TUint aProtocols, TRequestStatus& aStatus )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   414
	{ 
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   415
	LOG("RDirectPrintClient::StartDiscovery EReserveEngine");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   416
	TInt err = SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   417
	LOG1("RDirectPrintClient::StartDiscovery EReserveEngine err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   418
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   419
		{ 
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   420
		LOG1("RDirectPrintClient::StartDiscovery EStartDiscovery aProtocols: %d", aProtocols);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   421
		err = SendReceive( EStartDiscovery, TIpcArgs( aProtocols ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   422
		LOG1("RDirectPrintClient::StartDiscovery EStartDiscovery err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   423
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   424
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   425
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   426
		LOG("RDirectPrintClient::StartDiscovery EContinueDiscovery");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   427
		iDicsoveryDataPtr.Set(reinterpret_cast<TUint8*>(&aData), sizeof(aData), sizeof(aData));
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   428
		SendReceive( EContinueDiscovery, TIpcArgs( &iDicsoveryDataPtr ), aStatus );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   429
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   430
	LOG1("RDirectPrintClient::StartDiscovery end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   431
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   432
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   433
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   434
EXPORT_C TInt RDirectPrintClient::ContinueDiscovery( TDiscoveryGuardData& aData, TRequestStatus& aStatus )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   435
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   436
	LOG("RDirectPrintClient::ContinueDiscovery EReserveEngine");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   437
	TInt err = SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   438
	LOG1("RDirectPrintClient::ContinueDiscovery EReserveEngine err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   439
    if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   440
    	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   441
    	LOG("RDirectPrintClient::ContinueDiscovery EContinueDiscovery");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   442
	    iDicsoveryDataPtr.Set(reinterpret_cast<TUint8*>(&aData), sizeof(aData), sizeof(aData));
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   443
	    SendReceive( EContinueDiscovery, TIpcArgs( &iDicsoveryDataPtr ), aStatus );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   444
    	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   445
    LOG1("RDirectPrintClient::ContinueDiscovery end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   446
    return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   447
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   448
*/
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   449
EXPORT_C TInt RDirectPrintClient::CreateJob( TInt aPrinterID, TDirectPrintJobGuardData& aData, RPointerArray<TDesC>& aImages, TRequestStatus& aStatus )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   450
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   451
	LOG("RDirectPrintClient::CreateJob EReserveEngine");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   452
	TInt err = SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   453
	LOG1("RDirectPrintClient::CreateJob EReserveEngine err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   454
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   455
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   456
		TInt count = aImages.Count();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   457
		LOG1("RDirectPrintClient::CreateJob aImages.Count(): %d", aImages.Count());
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   458
		for( TInt i = 0; i < count && !err; i++ )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   459
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   460
			LOG("RDirectPrintClient::CreateJob EPrepareJob");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   461
			err = SendReceive( EPrepareJob, TIpcArgs( aImages[i] ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   462
			LOG1("RDirectPrintClient::CreateJob EPrepareJob err: %d", err);	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   463
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   464
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   465
    if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   466
    	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   467
    	LOG("RDirectPrintClient::CreateJob ECreateJob");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   468
    	err = SendReceive( ECreateJob, TIpcArgs( aPrinterID ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   469
    	LOG1("RDirectPrintClient::CreateJob ECreateJob err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   470
    	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   471
    if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   472
    	{ 
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   473
    	LOG("RDirectPrintClient::CreateJob EContinueCreateJob");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   474
    	iJobDataPtr.Set(reinterpret_cast<TUint8*>(&aData), sizeof(aData), sizeof(aData));
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   475
	    SendReceive( EContinueCreateJob, TIpcArgs( &iJobDataPtr ), aStatus );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   476
    	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   477
    LOG1("RDirectPrintClient::CreateJob end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   478
    return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   479
	}		
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   480
        
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   481
EXPORT_C TInt RDirectPrintClient::ContinueCreateJob( TDirectPrintJobGuardData& aData, TRequestStatus& aStatus )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   482
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   483
	LOG("RDirectPrintClient::ContinueCreateJob EReserveEngine");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   484
	TInt err = SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   485
	LOG1("RDirectPrintClient::ContinueCreateJob EReserveEngine err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   486
    if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   487
    	{  
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   488
    	LOG("RDirectPrintClient::ContinueCreateJob EContinueCreateJob");  	    	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   489
    	iJobDataPtr.Set(reinterpret_cast<TUint8*>(&aData), sizeof(aData), sizeof(aData));
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   490
	    SendReceive( EContinueCreateJob, TIpcArgs( &iJobDataPtr ), aStatus );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   491
    	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   492
    LOG1("RDirectPrintClient::ContinueCreateJob end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   493
    return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   494
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   495
	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   496
EXPORT_C TInt RDirectPrintClient::CancelStartDiscovery() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   497
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   498
	LOG("RDirectPrintClient::CancelStartDiscovery ECancelStartDiscovery");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   499
	TInt err = SendReceive( ECancelStartDiscovery );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   500
	LOG1("RDirectPrintClient::CancelStartDiscovery end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   501
	return err;	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   502
	}	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   503
		
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   504
EXPORT_C TInt RDirectPrintClient::CancelCreateJob() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   505
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   506
	LOG("RDirectPrintClient::CancelCreateJob ECancelCreateJob");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   507
	TInt err = SendReceive( ECancelCreateJob );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   508
	LOG1("RDirectPrintClient::CancelCreateJob end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   509
	return err;	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   510
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   511
	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   512
EXPORT_C TInt RDirectPrintClient::IsPictBridgeMode() const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   513
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   514
	LOG("RDirectPrintClient::IsPictBridgeMode EIsPictBridgeMode");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   515
#ifdef __WINS__
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   516
	TInt err( KErrNotFound );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   517
#else
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   518
	TInt err = SendReceive( EIsPictBridgeMode );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   519
#endif	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   520
	LOG1("RDirectPrintClient::IsPictBridgeMode end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   521
	return err;	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   522
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   523
	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   524
EXPORT_C TInt RDirectPrintClient::SetNumberOfCopies( const RArray<TInt>& aArray ) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   525
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   526
	LOG("RDirectPrintClient::SetNumberOfCopies EReserveEngine");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   527
	TInt err = SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   528
	LOG1("RDirectPrintClient::SetNumberOfCopies EReserveEngine err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   529
    if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   530
    	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   531
    	TInt count = aArray.Count();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   532
    	LOG1("RDirectPrintClient::SetNumberOfCopies count: %d", count);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   533
    	LOG("RDirectPrintClient::SetNumberOfCopies ESetNumberOfCopiesCount");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   534
		err = SendReceive( ESetNumberOfCopiesCount, TIpcArgs( count ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   535
		LOG1("RDirectPrintClient::SetNumberOfCopies ESetNumberOfCopiesCount err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   536
    	for( TInt i = 0; i < count && !err; i++ )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   537
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   538
			LOG1("RDirectPrintClient::SetNumberOfCopies i: %d", i);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   539
			LOG("RDirectPrintClient::SetNumberOfCopies ESetNumberOfCopies");
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   540
			err = SendReceive( ESetNumberOfCopies, TIpcArgs( aArray[i] ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   541
			LOG1("RDirectPrintClient::SetNumberOfCopies ESetNumberOfCopies err: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   542
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   543
    	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   544
	LOG1("RDirectPrintClient::SetNumberOfCopies end with: %d", err);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   545
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   546
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   547
	
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   548
EXPORT_C TInt RDirectPrintClient::GetProtocolNames(RSelectItemArray& aNames) const
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   549
	{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   550
	//TInt err = SendReceive( EReserveEngine );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   551
	TInt count;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   552
	TPckg<TInt> countBuf( count );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   553
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   554
	TInt err = SendReceive( EGetProtocolNamesCount, TIpcArgs( &countBuf ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   555
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   556
	if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   557
		{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   558
		aNames.Reset();
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   559
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   560
		for( TInt i = 0; i < count && !err; i++ )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   561
			{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   562
			TDirectPrintSelectItem item;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   563
			//iNameDataPtr.Set(reinterpret_cast<TUint8*>(&item), sizeof(item), sizeof(item));
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   564
			TPtr8 ptr(reinterpret_cast<TUint8*>(&item), sizeof(item), sizeof(item));
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   565
			//err = SendReceive( EGetProtocolName, TIpcArgs( i, &iNameDataPtr ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   566
			err = SendReceive( EGetProtocolName, TIpcArgs( i, &ptr ) );
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   567
			if( !err )
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   568
				{
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   569
				aNames.Append(item);
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   570
				}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   571
			}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   572
		}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   573
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   574
	return err;
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   575
	}
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   576
613a5ff70823 transfer from SFL repo (sfl/FCL/sf/app/printing/DirectPrint)
msekine <m.sekine@kthree.co.jp>
parents:
diff changeset
   577
//  End of File