|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTL2CAPSERVERCONNECTIONFACTORY_H |
|
20 #define BTL2CAPSERVERCONNECTIONFACTORY_H |
|
21 |
|
22 #include "javaosheaders.h" |
|
23 #include "serverconnectionfactorybase.h" |
|
24 |
|
25 namespace java |
|
26 { |
|
27 namespace bluetooth |
|
28 { |
|
29 |
|
30 /** |
|
31 * BtL2CapServerConnectionFactory used to create the ServerConnection. |
|
32 * It implements ServerConnectionFactoryBase. |
|
33 * |
|
34 * Internally it contains a Function Server that will be passed to every |
|
35 * ServerConnection object created. |
|
36 * |
|
37 * @lib javabtl2capscplugin.dll |
|
38 * @ |
|
39 */ |
|
40 class BtL2CapServerConnectionFactory: |
|
41 public java::push::ServerConnectionFactoryBase |
|
42 { |
|
43 //Not implemented |
|
44 BtL2CapServerConnectionFactory(const BtL2CapServerConnectionFactory&); |
|
45 BtL2CapServerConnectionFactory &operator=( |
|
46 const BtL2CapServerConnectionFactory&); |
|
47 |
|
48 public: |
|
49 OS_IMPORT BtL2CapServerConnectionFactory(); |
|
50 OS_IMPORT ~BtL2CapServerConnectionFactory(); |
|
51 |
|
52 /** |
|
53 * This operation creates ServerConnection if it is not already created. |
|
54 * @exception throws RuntimeException if type of the existing ServerConnection |
|
55 * object is PUSH_LISTEN_BY_MIDLET || PUSH and isMultipleSrvConnAllowed() |
|
56 * operation returns 'false'. |
|
57 */ |
|
58 OS_IMPORT virtual java::push::ServerConnection* create( |
|
59 const std::wstring& aUri); |
|
60 /** |
|
61 * create serverconnection for the given Connection URI |
|
62 * @ |
|
63 * |
|
64 * @return ServerConnection |
|
65 */ |
|
66 OS_IMPORT |
|
67 virtual java::push::ServerConnection* createSrvConnObj( |
|
68 const std::wstring& aUri, const std::wstring& aFilter); |
|
69 |
|
70 /** |
|
71 * Checks for multiple server connection is allowed for the given |
|
72 * Connection URI |
|
73 * |
|
74 * |
|
75 * @return |
|
76 */ |
|
77 OS_IMPORT virtual bool isMultipleSrvConnAllowed(); |
|
78 |
|
79 /** |
|
80 * factory method to create the server connection factory |
|
81 * @ |
|
82 * |
|
83 * @return BtL2CapServerConnectionFactory |
|
84 */ |
|
85 OS_IMPORT static BtL2CapServerConnectionFactory& getFactory(); |
|
86 |
|
87 }; |
|
88 |
|
89 } // namespace java |
|
90 } // namespace bluetooth |
|
91 |
|
92 |
|
93 #endif // BTL2CAPSERVERCONNECTIONFACTORY_H |