|
1 /* |
|
2 * Copyright (c) 2004 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: Connection UI interprocess signaller. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MCNUISIGNALLER_H |
|
19 #define __MCNUISIGNALLER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 |
|
25 //FORWARD DECLARATION |
|
26 class MCnUiSignaller; |
|
27 |
|
28 |
|
29 /** |
|
30 * Global factory method to create concrete |
|
31 * signaller. |
|
32 * |
|
33 * @since 2.1 |
|
34 * @return New MCnUiSignaller instance. |
|
35 */ |
|
36 GLREF_D MCnUiSignaller* CreateConnUiSignallerL(); |
|
37 GLREF_D MCnUiSignaller* CreateConnUiSignallerLC(); |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 // CLASS DECLARATION |
|
43 /** |
|
44 * Connection UI signaller. |
|
45 * |
|
46 * Interface for Connection UI interprocess signalling. |
|
47 * Connection Ui signaller is used to signal between |
|
48 * different Connection Ui client processies. |
|
49 * |
|
50 * Signaller offers methods to signal from running |
|
51 * operations, raised errors etc. |
|
52 * |
|
53 * @since 2.1 |
|
54 */ |
|
55 NONSHARABLE_CLASS( MCnUiSignaller ) |
|
56 { |
|
57 public: // New operation signalling related functions. |
|
58 |
|
59 /** |
|
60 * Sets operation signal "on". |
|
61 * |
|
62 * Sets operation signal "on". Setted signal is "on" untill |
|
63 * the signal is cancelled, or the signaller object |
|
64 * is destroyed. There can be globally only one |
|
65 * operation signal "on" at time. If there exist already |
|
66 * other operation signal on "on" state when executing |
|
67 * this SignalOperationL(), returns KErrInUse. |
|
68 * Else returns KErrNone. If issuing the signal |
|
69 * fails due out of resources, leaves with KErrNoMemory. |
|
70 * |
|
71 * @since 2.1 |
|
72 * @param aDetailDesc The detail descriptor to hold with the operation signal. |
|
73 */ |
|
74 virtual TInt SignalOperationL( const TDesC& aDetailDesc ) = 0; |
|
75 |
|
76 |
|
77 /** |
|
78 * Cancels previously by this object issued operation signal. |
|
79 * |
|
80 * Cancels previously by this object issued operation signal. |
|
81 * If no operation signal is issued, does nothing. |
|
82 * |
|
83 * @since 2.1 |
|
84 */ |
|
85 virtual void CancelOperationSignal() = 0; |
|
86 |
|
87 |
|
88 /** |
|
89 * Tests the signal state. |
|
90 * |
|
91 * Tests wether the operation signal is "on" or "off". |
|
92 * |
|
93 * @since 2.1 |
|
94 * @return ETrue if the signal was on. Else EFalse. |
|
95 */ |
|
96 virtual TBool OperationRunning() = 0; |
|
97 |
|
98 |
|
99 /** |
|
100 * Gets the operation signal details. |
|
101 * |
|
102 * Tests wether the operation signal is "on" or "off". |
|
103 * If signal is off, returns empty buffer. |
|
104 * Else returns the value previously stored by the |
|
105 * SignalOperationL(). |
|
106 * |
|
107 * Ownership of the created buffer is returned to |
|
108 * caller. |
|
109 * |
|
110 * @since 2.1 |
|
111 * @param aDetailDesc The detail descriptor holded with the signal. |
|
112 */ |
|
113 virtual void OperationDetailsL( HBufC*& aDetailDesc ) = 0; |
|
114 |
|
115 |
|
116 public: //Destructor |
|
117 |
|
118 /** |
|
119 * Virtual inline destructor. |
|
120 * |
|
121 * Concrete object can be destructed |
|
122 * using this interface. |
|
123 * |
|
124 * Destroying signaller cancels any previously |
|
125 * by this signaller object raised operation signal. |
|
126 * (Effectively done by calling the |
|
127 * CancelOperationSignal().) |
|
128 */ |
|
129 virtual ~MCnUiSignaller() {}; |
|
130 }; |
|
131 |
|
132 |
|
133 #endif // __MCNUISIGNALLER_H |
|
134 |
|
135 // End of File |
|
136 |