1 // Copyright (c) 2005-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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef __OBEXCLIENTERRORRESOLVER_H |
|
23 #define __OBEXCLIENTERRORRESOLVER_H |
|
24 |
|
25 #include <obexclient.h> |
|
26 |
|
27 class MObexClientErrorResolver; |
|
28 |
|
29 /** |
|
30 Types of error set that an Obex client error can be resolved to. |
|
31 */ |
|
32 enum TObexClientErrorResolutionSetType |
|
33 { |
|
34 /** |
|
35 The basic error set that errors can be resolved to. |
|
36 @see TObexClientBasicErrorResolutionSet |
|
37 */ |
|
38 EObexClientBasicErrorResolutionSet = 0, |
|
39 }; |
|
40 |
|
41 /** |
|
42 The basic error set that errors can be resolved to. |
|
43 */ |
|
44 enum TObexClientBasicErrorResolutionSet |
|
45 { |
|
46 /** |
|
47 The last client operation completed without error. |
|
48 This value is unused but remains here for compatibility. |
|
49 */ |
|
50 EObexNoExtendedError = 0, |
|
51 |
|
52 /** |
|
53 The last client operation completed without error. |
|
54 */ |
|
55 EObexRequestAccepted = 1, |
|
56 |
|
57 /** |
|
58 The last client operation was unauthorised or resulted in |
|
59 an error being returned from the server. |
|
60 */ |
|
61 EObexRequestNotAccepted = 2, |
|
62 |
|
63 /** |
|
64 The last client operation timed out. |
|
65 */ |
|
66 EObexRequestTimeout = 3, |
|
67 |
|
68 /** |
|
69 The last client operation was interrupted by an error |
|
70 detected on the client side, which includes the following: |
|
71 - Cancellation of the operation (Abort) |
|
72 - Obex protocol error |
|
73 - Out of memory condition |
|
74 */ |
|
75 EObexRequestLocalInterruption = 4, |
|
76 |
|
77 /** |
|
78 The last client operation was interrupted due to the |
|
79 transport link going down. This may be caused by: |
|
80 - Failure to find a remote device capable of Obex |
|
81 - Blocking of the IrDA beam |
|
82 */ |
|
83 EObexRequestLinkInterruption = 5, |
|
84 }; |
|
85 |
|
86 /** |
|
87 Extension class for CObexClient that allows Obex client applications to |
|
88 retrieve an extended error code for the last completed client operation. |
|
89 */ |
|
90 NONSHARABLE_CLASS(CObexClientErrorResolver) : public CBase |
|
91 { |
|
92 public: |
|
93 IMPORT_C static CObexClientErrorResolver* NewL(CObexClient& aClient); |
|
94 IMPORT_C static CObexClientErrorResolver* NewL(CObexClient& aClient, TObexClientErrorResolutionSetType aErrorSet); |
|
95 IMPORT_C TUint LastError() const; |
|
96 |
|
97 private: |
|
98 // Private constructor - this class is not intended for derivation. |
|
99 CObexClientErrorResolver(CObexClient& aClient, TObexClientErrorResolutionSetType aErrorSet); |
|
100 void ConstructL(); |
|
101 |
|
102 private: |
|
103 CObexClient& iObexClient; |
|
104 MObexClientErrorResolver* iClientErrorResolver; |
|
105 TObexClientErrorResolutionSetType iErrorSet; |
|
106 }; |
|
107 |
|
108 #endif // __OBEXCLIENTERRORRESOLVER_H |
|