|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Manages session connections to Shared Data server |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include <e32std.h> |
|
24 #include "dosclishareddata.h" |
|
25 #include "dosclientserver.h" |
|
26 #include "dos_debug.h" |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // ================= MEMBER FUNCTIONS ========================================== |
|
31 |
|
32 // --------------------------------------------------------- |
|
33 // RDosSharedData::Open |
|
34 // --------------------------------------------------------- |
|
35 // |
|
36 EXPORT_C TInt RDosSharedData::Open(RDosServer& aServer) |
|
37 { |
|
38 COM_TRACE_( "RDosSharedData::Open(RDosServer& aServer)" ); |
|
39 return CreateSubSession(aServer,EDosCreateSharedDataSubSession, TIpcArgs(TIpcArgs::ENothing, TIpcArgs::ENothing, KAutoComplete)); |
|
40 } |
|
41 |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // RDosSharedData::RequestFreeDiskSpace() |
|
45 // ----------------------------------------------------------------------------- |
|
46 |
|
47 EXPORT_C void RDosSharedData::RequestFreeDiskSpace( const TInt aAmount) const |
|
48 { |
|
49 COM_TRACE_( "RDosSharedData::RequestFreeDiskSpace" ); |
|
50 TInt iRet = SendReceive(ERequestFreeDiskSpace, TIpcArgs(aAmount, TIpcArgs::ENothing, KAutoComplete)); |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // RDosSharedData::RequestFreeDiskSpaceCancel() |
|
55 // ----------------------------------------------------------------------------- |
|
56 |
|
57 EXPORT_C void RDosSharedData::RequestFreeDiskSpaceCancel() const |
|
58 { |
|
59 COM_TRACE_( "RDosSharedData::RequestFreeDiskSpaceCancel(), calling SendReceive" ); |
|
60 SendReceive(ERequestFreeDiskSpaceCancel, TIpcArgs(TIpcArgs::ENothing, TIpcArgs::ENothing, KAutoComplete)); |
|
61 } |
|
62 |
|
63 EXPORT_C void RDosSharedData::Close() |
|
64 { |
|
65 COM_TRACE_( "RDosSharedData::Close(), calling RequestFreeDiskSpaceCancel()" ); |
|
66 RequestFreeDiskSpaceCancel(); |
|
67 COM_TRACE_( "RDosSharedData::Close(), calling CloseSubSession(EDosCloseSubSession)" ); |
|
68 CloseSubSession(EDosCloseSubSession); |
|
69 } |
|
70 |
|
71 // End of File |