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