|
1 /* |
|
2 * Copyright (c) 2010 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 : Content Arsenal client session |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CAOBSERVER_H_ |
|
19 #define CAOBSERVER_H_ |
|
20 |
|
21 #include <QObject> |
|
22 #include <QMutex> |
|
23 |
|
24 #include "cadefs.h" |
|
25 |
|
26 |
|
27 class CaEntry; |
|
28 |
|
29 |
|
30 class CaObserver: public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 public: |
|
34 /** |
|
35 * Constructor. |
|
36 * @param parent pointer to parent. Defaults to NULL. |
|
37 */ |
|
38 CaObserver(QObject *parent = 0); |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 ~CaObserver(); |
|
44 |
|
45 /** |
|
46 * Method invoked when entry is changed. |
|
47 * @param entryId entry id. |
|
48 * @param changeType change type. |
|
49 */ |
|
50 void entryChanged(int entryId, |
|
51 ChangeType changeType) const; |
|
52 |
|
53 /** |
|
54 * Method invoked when entry is changed. |
|
55 * @param entry entry. |
|
56 * @param changeType change type. |
|
57 */ |
|
58 void entryChanged(const CaEntry &entry, |
|
59 ChangeType changeType) const; |
|
60 |
|
61 /** |
|
62 * Method invoked when entry was changed. |
|
63 * @param entryId entry id. |
|
64 */ |
|
65 void entryTouched(int id) const; |
|
66 |
|
67 /** |
|
68 * Method invoked when entry was changed. |
|
69 * @param groupId group id. |
|
70 */ |
|
71 void groupContentChanged(int groupId) const; |
|
72 |
|
73 signals: |
|
74 |
|
75 void signalEntryChanged(int entryId, ChangeType changeType) const; |
|
76 void signalEntryChanged(const CaEntry &entry, |
|
77 ChangeType changeType) const; |
|
78 void signalEntryTouched(int id) const; |
|
79 void signalGroupContentChanged(int groupId) const; |
|
80 }; |
|
81 |
|
82 |
|
83 #endif /* CAOBSERVER_H_ */ |