1 /* |
|
2 * Copyright (c) 2007-2008 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: Send data operation holder |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __COSSSENDDATAOPERATION_H__ |
|
19 #define __COSSSENDDATAOPERATION_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include "ossprotocolpluginlogger.h" |
|
24 #include <e32base.h> |
|
25 |
|
26 |
|
27 /** |
|
28 * COssSendDataOperation: |
|
29 * Send data operation holder |
|
30 * |
|
31 */ |
|
32 NONSHARABLE_CLASS ( COssSendDataOperation ) : |
|
33 public CBase |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 static COssSendDataOperation* NewLC(); |
|
39 |
|
40 /** |
|
41 * Default constructor |
|
42 */ |
|
43 COssSendDataOperation(); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 ~COssSendDataOperation(); |
|
49 |
|
50 |
|
51 public: // new function of the class |
|
52 |
|
53 |
|
54 /** |
|
55 * Set ids, operation and log id |
|
56 */ |
|
57 void SetIds ( TInt aOperationId, TInt aLogId ); |
|
58 |
|
59 /** |
|
60 * Set request status |
|
61 */ |
|
62 void SetRequestStatus ( TRequestStatus& aStatus ); |
|
63 |
|
64 |
|
65 /** |
|
66 * request status of this operation |
|
67 * @return Trequest status of this operation |
|
68 */ |
|
69 TRequestStatus* Status(); |
|
70 |
|
71 /** |
|
72 * Get Ids |
|
73 * |
|
74 * @return operation Id |
|
75 */ |
|
76 TInt OperationId() const; |
|
77 |
|
78 /** |
|
79 * Complete operation |
|
80 * |
|
81 * @param aCode complete code |
|
82 */ |
|
83 void CompletedOperation ( TInt aCode ); |
|
84 |
|
85 /** |
|
86 * Set response buffer |
|
87 * Owner ship is transfered |
|
88 * @param aBuff response buffer |
|
89 */ |
|
90 void SetResponse ( char* aBuff ); |
|
91 |
|
92 /** |
|
93 * Response buffer, |
|
94 * owner ship is transfered |
|
95 * @return transfer buffer |
|
96 */ |
|
97 char* Response(); |
|
98 |
|
99 private: // Public data |
|
100 |
|
101 /** |
|
102 * Status of the operation |
|
103 */ |
|
104 TRequestStatus* iStatus; |
|
105 |
|
106 /** |
|
107 * Operation Id |
|
108 * OWN |
|
109 */ |
|
110 TInt iOpId; |
|
111 |
|
112 /** |
|
113 * Response buffer |
|
114 * OWN |
|
115 */ |
|
116 char* iData; |
|
117 /** |
|
118 * Id used for logs writting |
|
119 * OWN |
|
120 */ |
|
121 TInt iLogId; |
|
122 }; |
|
123 |
|
124 |
|
125 |
|
126 #endif // __COSSSENDDATAOPERATION_H__ |
|
127 |
|
128 // End of File |
|