equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 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 #ifndef CONNECTIONLISTENER_H |
|
19 #define CONNECTIONLISTENER_H |
|
20 |
|
21 #include <string> |
|
22 |
|
23 namespace java |
|
24 { |
|
25 namespace push |
|
26 { |
|
27 /** |
|
28 * Server Connection Plugin informs Push Controller about arrived message and error |
|
29 * via this interface. |
|
30 */ |
|
31 |
|
32 class ConnectionListener |
|
33 { |
|
34 public: |
|
35 |
|
36 virtual ~ConnectionListener() {} |
|
37 |
|
38 /** |
|
39 * This operation must be called when message arrives to the connection. |
|
40 * @param aInfo Argument to pass extra information from active connection |
|
41 * to runtime. Currently only bluetooth uses this argument. Other |
|
42 * protocols MUST NOT USED this argument. |
|
43 */ |
|
44 virtual void msgArrived(const std::wstring& aInfo=L"") = 0; |
|
45 |
|
46 /** |
|
47 * This operation can be called if critical error occurs in the listening a push connection. |
|
48 * This operation does not throw an exception. |
|
49 * @param aUri URI of the failed connection. |
|
50 * @param aErrCode Error code defined by user. |
|
51 * @param aErrText Error text defined by user. |
|
52 */ |
|
53 virtual void error(const std::wstring& aUri,int aErrCode, const std::string& aErrText) = 0; |
|
54 |
|
55 }; |
|
56 |
|
57 |
|
58 }//end namespace push |
|
59 }//end namespace java |
|
60 |
|
61 #endif // CONNECTIONLISTENER_H |