|
1 // Copyright (c) 2007-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 */ |
|
19 |
|
20 #ifndef __AMASTARTSRV_H__ |
|
21 #define __AMASTARTSRV_H__ |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <f32file.h> |
|
25 #include <s32strm.h> |
|
26 #include <s32mem.h> |
|
27 |
|
28 #include "amastartsess.h" |
|
29 #include "amastartconst.h" |
|
30 #include "amastartasync.h" |
|
31 #include "ssmdebug.h" |
|
32 |
|
33 |
|
34 const TInt KAmaStartSrvVersionMajor = 0; // 0-127 |
|
35 const TInt KAmaStartSrvVersionMinor = 0; // 0-99 |
|
36 const TInt KAmaStartSrvVersionBuild = 0; // 0-32767 |
|
37 const TInt KAmaStartSrvDesArg = 0; |
|
38 |
|
39 _LIT( KAmaStartSrvName, "!AmaStartSrv" ); |
|
40 |
|
41 class CAmaStartSession; |
|
42 |
|
43 /** |
|
44 * @internalTechnology |
|
45 * @released |
|
46 */ |
|
47 struct TAmaStartSessionInfo |
|
48 { |
|
49 CAmaStartAsync* iStarter; |
|
50 RMessagePtr2 iMessagePtr; |
|
51 TBool iInUse; |
|
52 }; |
|
53 |
|
54 |
|
55 /** |
|
56 * @internalTechnology |
|
57 * @released |
|
58 */ |
|
59 NONSHARABLE_CLASS( CAmaStartServer ) : public CServer2 |
|
60 { |
|
61 |
|
62 public: |
|
63 IMPORT_C static CAmaStartServer* NewLC(); |
|
64 IMPORT_C static TInt StartAmaStartSrv(); |
|
65 ~CAmaStartServer(); |
|
66 |
|
67 void StartDscL( const TUid& aDscId, const RMessage2& aMessage, const TInt aSessionIndex ); |
|
68 void StartDscCancel( const TInt aSessionIndex ); |
|
69 void RegisterSessionL( TInt& aSessionIndex ); |
|
70 void DeregisterSession( const TInt& aSessionIndex ); |
|
71 // From CServer2 |
|
72 IMPORT_C CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage ) const; |
|
73 |
|
74 private: |
|
75 CAmaStartServer(); |
|
76 void ConstructL(); |
|
77 static TInt AmaStartSrvThreadFn( TAny* aAny ); |
|
78 static void AmaStartSrvThreadRunL(); |
|
79 |
|
80 private: |
|
81 TVersion iVersion; |
|
82 RArray<TAmaStartSessionInfo> iSessionInfoArray; |
|
83 TInt iSessionCount; |
|
84 }; |
|
85 |
|
86 |
|
87 #endif // __AMASTARTSRV_H__ |