|
1 // Copyright (c) 1999-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 #ifndef __ASSRVSESSIONCOLLECTION_H__ |
|
17 #define __ASSRVSESSIONCOLLECTION_H__ |
|
18 |
|
19 // System includes |
|
20 #include <e32std.h> |
|
21 |
|
22 // User includes |
|
23 #include "ASSrvDefs.h" |
|
24 |
|
25 // Classes referenced |
|
26 class CASSrvSession; |
|
27 |
|
28 |
|
29 // |
|
30 // ----> MASSrvSession (header) |
|
31 // |
|
32 /** |
|
33 * Represents a session with the Alarm Server |
|
34 */ |
|
35 class MASSrvSession |
|
36 { |
|
37 // |
|
38 public: // FROM MASSrvSession |
|
39 // |
|
40 |
|
41 /** |
|
42 * Returns the unique id assocaited with a session |
|
43 */ |
|
44 virtual TASSrvSessionId MASSrvSessionId() const = 0; |
|
45 |
|
46 /** |
|
47 * Returns the name of the thread associated with a session |
|
48 */ |
|
49 virtual void MASSrvSessionFullName(TDes& aDes) const = 0; |
|
50 }; |
|
51 |
|
52 |
|
53 // |
|
54 // ----> MASSrvSessionCollection (header) |
|
55 // |
|
56 /** |
|
57 * Each session has a unique identifier associated with it (see the CASSrvSessionEngine |
|
58 * object). This unique identifier is used for two purposes: |
|
59 * |
|
60 * 1). To ensure that when a client creates a "session alarm" (AddWithNotification) |
|
61 * we are able to correctly DeQueue the right alarm when that session disconnects |
|
62 * unexpectedly. |
|
63 * |
|
64 * 2). So that it is possible to identify the owning thread for a given alarm. Each |
|
65 * CSession2 object has an associated (and underlying RThread). In order to return |
|
66 * the name of the thread through the client-API we need a method of associating |
|
67 * sessions with alarms. |
|
68 */ |
|
69 class MASSrvSessionCollection |
|
70 { |
|
71 // |
|
72 public: // FROM MASSrvSessionConnection |
|
73 // |
|
74 |
|
75 /** |
|
76 * Attach a particular session to the list of sessions |
|
77 */ |
|
78 virtual TASSrvSessionId MASSessionCollectionAttachL(const MASSrvSession& aSession) = 0; |
|
79 |
|
80 /** |
|
81 * Remove a session from the list of sessions |
|
82 */ |
|
83 virtual void MASSessionCollectionDetach(const MASSrvSession& aSession) = 0; |
|
84 |
|
85 /** |
|
86 * Get the owning thread name of a particular alarm |
|
87 */ |
|
88 virtual TInt MASSessionCollectionAlarmOwner(TAlarmId aAlarmId, TDes& aFullName) const = 0; |
|
89 }; |
|
90 |
|
91 #endif |