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