~ubuntu-branches/ubuntu/quantal/qtmobility/quantal

« back to all changes in this revision

Viewing changes to plugins/landmarks/symbian_landmarks/src/qlandmarkdbeventhandler.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-11-16 16:18:07 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20101116161807-k2dzt2nyse975r3l
Tags: 1.1.0-0ubuntu1
* New upstream release
* Syncronise with Debian, no remaining changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 **
9
9
 ** $QT_BEGIN_LICENSE:LGPL$
10
10
 ** Commercial Usage
11
 
 ** Licensees holding valid Qt Commercial licenses may use this file in
12
 
 ** accordance with the Qt Solutions Commercial License Agreement provided
13
 
 ** with the Software or, alternatively, in accordance with the terms
 
11
 ** Licensees holding valid Qt Commercial licenses may use this file in 
 
12
 ** accordance with the Qt Commercial License Agreement provided with
 
13
 ** the Software or, alternatively, in accordance with the terms
14
14
 ** contained in a written agreement between you and Nokia.
15
15
 **
16
16
 ** GNU Lesser General Public License Usage
33
33
 ** ensure the GNU General Public License version 3.0 requirements will be
34
34
 ** met: http://www.gnu.org/copyleft/gpl.html.
35
35
 **
36
 
 ** Please note Third Party Software included with Qt Solutions may impose
37
 
 ** additional restrictions and it is the user's responsibility to ensure
38
 
 ** that they have met the licensing requirements of the GPL, LGPL, or Qt
39
 
 ** Solutions Commercial license and the relevant license of the Third
40
 
 ** Party Software they are using.
41
 
 **
42
36
 ** If you are unsure which license is appropriate for your use, please
43
37
 ** contact the sales department at qt-sales@nokia.com.
44
38
 ** $QT_END_LICENSE$
46
40
 ****************************************************************************/
47
41
 
48
42
#include "qlandmarkdbeventhandler.h"
 
43
#include <qdebug.h>
49
44
 
50
45
//Constants
51
46
//const TInt KInitialSemaphoreCount = 0;
108
103
 */
109
104
void CLandmarkDbEventHandler::RunL()
110
105
{
 
106
    //qDebug() << "CLandmarkDbEventHandler::RunL() start";
111
107
    // If the event completed successfully
112
108
    if (iStatus.Int() == KErrNone) {
113
109
        // Acquire the lock, this is required as the observers cannot modified
116
112
        // Iterate through all the registered observers and call handleDatabaseEvent
117
113
        for (TInt i = 0; i < iObserverList.Count(); i++) {
118
114
            // Call the observer and indicate the event occurred
 
115
 
 
116
            //qDebug() << "Notifying " << i+1 << " observer";
119
117
            iObserverList[i]->handleDatabaseEvent(iEvent);
 
118
 
120
119
        }
121
120
        // Request for database notification again
122
121
        StartListening();
123
122
        // release the lock
124
123
        iObserverLock.Signal();
125
124
    }
 
125
    //qDebug() << "CLandmarkDbEventHandler::RunL() end";
126
126
}
127
127
 
128
128
void CLandmarkDbEventHandler::DoCancel()
139
139
 */
140
140
TInt CLandmarkDbEventHandler::AddObsever(MLandmarkDbEventObserver* aObserverHandle)
141
141
{
 
142
    //qDebug() << "Adding Observer";
 
143
 
142
144
    if (!iIsInitialized) {
143
145
        TRAPD(err,InitializeL());
144
146
        if (err) {
162
164
 */
163
165
TInt CLandmarkDbEventHandler::RemoveObsever(MLandmarkDbEventObserver* aObserverHandle)
164
166
{
 
167
    //qDebug() << "Removing Observer";
 
168
 
165
169
    if (!iIsInitialized) {
166
170
        TRAPD(err,InitializeL());
167
171
        if (err) {