|
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // DBMS server proxy incremental object |
|
15 // |
|
16 // |
|
17 |
|
18 #include "SD_STD.H" |
|
19 |
|
20 // Class CDbsIncremental |
|
21 CDbsIncremental* CDbsIncremental::NewL(const RDbsObject& aDbs,TDbsFunction aFunction,TIpcArgs& aArgs,TInt& aStep) |
|
22 { |
|
23 TPckg<TInt> pckg(aStep); |
|
24 aArgs.Set(3,&pckg); |
|
25 CDbsIncremental* self=new(ELeave) CDbsIncremental; |
|
26 CleanupStack::PushL(self); |
|
27 self->iObject.OpenL(aDbs,aFunction,aArgs); |
|
28 if (self->iObject.Handle()==0) |
|
29 { // no incremental object was required, so remove this one |
|
30 CleanupStack::PopAndDestroy(); // self |
|
31 return 0; |
|
32 } |
|
33 CleanupStack::Pop(); // self |
|
34 return self; |
|
35 } |
|
36 |
|
37 CDbsIncremental::~CDbsIncremental() |
|
38 { |
|
39 iObject.Close(); |
|
40 } |
|
41 |
|
42 void CDbsIncremental::Next(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus) |
|
43 // |
|
44 // Asyncronous next step |
|
45 // |
|
46 { |
|
47 iObject.SendReceive(EDbsIncrementalNext,TIpcArgs(aStep(),&aStep),aStatus); |
|
48 } |