943 // CBtPrintingDevice::SetNumsOfCopiesL |
943 // CBtPrintingDevice::SetNumsOfCopiesL |
944 // |
944 // |
945 //-------------------------------------------------------------------------------------------- |
945 //-------------------------------------------------------------------------------------------- |
946 void CBtPrintingDevice::SetNumsOfCopiesL( const RArray<TInt>& aNumsOfCopies, TInt& aErr ) |
946 void CBtPrintingDevice::SetNumsOfCopiesL( const RArray<TInt>& aNumsOfCopies, TInt& aErr ) |
947 { |
947 { |
948 LOG1("[CBtPrintingDevice::SetNumsOfCopiesL]\t iPrintingJob->JobState(): %d", iPrintingJob->JobState()); |
|
949 |
|
950 if( !iPrintingJob || iPrintingJob->JobState() != CPrintJob::EStateCreated ) |
948 if( !iPrintingJob || iPrintingJob->JobState() != CPrintJob::EStateCreated ) |
951 { |
949 { |
952 aErr = KErrInvalidSequence; |
950 aErr = KErrInvalidSequence; |
953 return; |
951 return; |
954 } |
952 } |
|
953 |
|
954 LOG1("[CBtPrintingDevice::SetNumsOfCopiesL]\t iPrintingJob->JobState(): %d", iPrintingJob->JobState()); |
955 |
955 |
956 LOG2("[CBtPrintingDevice::SetNumsOfCopiesL]\t ImageCount(): %d, copies count: %d ", |
956 LOG2("[CBtPrintingDevice::SetNumsOfCopiesL]\t ImageCount(): %d, copies count: %d ", |
957 iPrintingJob->ImageCount(), aNumsOfCopies.Count()); |
957 iPrintingJob->ImageCount(), aNumsOfCopies.Count()); |
958 if( iPrintingJob->ImageCount() != aNumsOfCopies.Count() ) |
958 if( iPrintingJob->ImageCount() != aNumsOfCopies.Count() ) |
959 { |
959 { |
1578 // CBtPrintingDevice::CancelJobL |
1578 // CBtPrintingDevice::CancelJobL |
1579 // |
1579 // |
1580 //-------------------------------------------------------------------------------------------- |
1580 //-------------------------------------------------------------------------------------------- |
1581 void CBtPrintingDevice::CancelJobL() |
1581 void CBtPrintingDevice::CancelJobL() |
1582 { |
1582 { |
1583 LOG1("[CBtPrintingDevice::CancelJobL]\t begin at iPrintingJob->JobState(): %d", iPrintingJob->JobState()); |
1583 LOG("[CBtPrintingDevice::CancelJobL]\t begin"); |
1584 |
1584 |
1585 // If not submitted, return |
1585 // If not submitted, return |
1586 if( !iPrintingJob || |
1586 if( !iPrintingJob || |
1587 (CPrintJob::EStateSubmitted != iPrintingJob->JobState() && |
1587 (CPrintJob::EStateSubmitted != iPrintingJob->JobState() && |
1588 CPrintJob::EStateSending != iPrintingJob->JobState() && |
1588 CPrintJob::EStateSending != iPrintingJob->JobState() && |
1589 CPrintJob::EStatePrinting != iPrintingJob->JobState()) ) |
1589 CPrintJob::EStatePrinting != iPrintingJob->JobState()) ) |
1590 User::Leave(KErrInvalidSequence); |
1590 User::Leave(KErrInvalidSequence); |
|
1591 |
|
1592 LOG1("[CBtPrintingDevice::CancelJobL]\t begin at iPrintingJob->JobState(): %d", iPrintingJob->JobState()); |
1591 |
1593 |
1592 CRsBtDevice* printer = static_cast<CRsBtDevice*>(User::LeaveIfNull( |
1594 CRsBtDevice* printer = static_cast<CRsBtDevice*>(User::LeaveIfNull( |
1593 FindDevice(iPrintingJob->PrinterId()))); |
1595 FindDevice(iPrintingJob->PrinterId()))); |
1594 |
1596 |
1595 iPrintingJob->UpdateJobState(CPrintJob::EStateCancel); |
1597 iPrintingJob->UpdateJobState(CPrintJob::EStateCancel); |