|
1 /* |
|
2 * Copyright (c) 2002 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: API for sending services |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BT_SERVICE_API_H |
|
21 #define BT_SERVICE_API_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "BTServiceParameterList.h" |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // DATA TYPES |
|
29 |
|
30 enum TBTServiceType |
|
31 { |
|
32 EBTSendingService, |
|
33 EBTPrintingService, |
|
34 EBTObjectPushService // use this if support for only OPP is wanted |
|
35 }; |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CBTServiceStarter; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * An API for starting Bluetooth services. |
|
44 * |
|
45 * @lib BtServiceUtils.lib |
|
46 * @since Series 60 2.6 |
|
47 */ |
|
48 class CBTServiceAPI : public CBase |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 IMPORT_C static CBTServiceAPI* NewL(); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CBTServiceAPI(); |
|
61 |
|
62 public: // New functions |
|
63 |
|
64 /** |
|
65 * Starts the given service. |
|
66 * Returns when service is started. |
|
67 * @since Series 60 2.6 |
|
68 * @param aService The service to be started. |
|
69 * @param aList Parameters for the service. |
|
70 * @return None. |
|
71 */ |
|
72 IMPORT_C void StartServiceL( TBTServiceType aService, |
|
73 CBTServiceParameterList* aList ); |
|
74 |
|
75 /** |
|
76 * Starts the given service. |
|
77 * Returns when service is completed. |
|
78 * @since Series 60 2.6 |
|
79 * @param aService The service to be started. |
|
80 * @param aList Parameters for the service. |
|
81 * @return None. |
|
82 */ |
|
83 IMPORT_C void StartSynchronousServiceL( TBTServiceType aService, |
|
84 CBTServiceParameterList* aList ); |
|
85 private: |
|
86 |
|
87 /** |
|
88 * C++ default constructor. |
|
89 */ |
|
90 CBTServiceAPI(); |
|
91 |
|
92 /** |
|
93 * By default Symbian 2nd phase constructor is private. |
|
94 */ |
|
95 void ConstructL(); |
|
96 |
|
97 private: // Data |
|
98 |
|
99 CBTServiceStarter* iStarter; |
|
100 CActiveSchedulerWait iSyncWaiter; |
|
101 }; |
|
102 |
|
103 #endif // BT_SERVICE_API_H |
|
104 |
|
105 // End of File |