Classified ads
mockup_model.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti Järvinen 2013.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef MOCKUP_MODEL_H
22 #define MOCKUP_MODEL_H
23 #include "../mcontroller.h"
24 #include "../datamodel/mmodelprotocolinterface.h"
25 #include "../datamodel/mnodemodelprotocolinterface.h"
26 #include <QMutex>
27 class MockUpNodeModel ;
28 class ProfileModel ;
29 class BinaryFileModel ;
30 class ClassifiedAdsModel ;
31 class PrivMessageModel ;
33 class ProfileCommentModel ;
34 class SearchModel;
35 
40  Q_OBJECT
41 
42 public:
46  MockUpModel(MController *aMController) ;
50  ~MockUpModel() ;
57  aRequest) const ;
61  virtual bool lock() ;
65  virtual void unlock() ;
69  virtual MNodeModelProtocolInterface& nodeModel() const ;
70  virtual ProfileModel& profileModel() const ;
71 
75  virtual BinaryFileModel& binaryFileModel() const ;
77  virtual ClassifiedAdsModel& classifiedAdsModel() const ;
78  virtual PrivMessageModel& privateMessageModel() const ;
81  virtual ProfileCommentModel& profileCommentModel() const ;
82  virtual SearchModel* searchModel() const ;
84 public:
86  QList<NetworkRequestExecutor::NetworkRequestQueueItem>* iNetworkRequests ;
87 private: // member data
89  QMutex iMutex ;
97 } ;
98 
99 #endif /* #define MOCKUP_CONTROLLER_H */
QList< NetworkRequestExecutor::NetworkRequestQueueItem > * iNetworkRequests
Definition: mockup_model.h:86
virtual MNodeModelProtocolInterface & nodeModel() const
virtual void addNetworkRequest(NetworkRequestExecutor::NetworkRequestQueueItem &aRequest) const
virtual void unlock()
virtual bool lock()
Model-class for performing text-based searches on objects in db This datamodel part is dual-use ; it ...
Definition: searchmodel.h:45
virtual PrivMessageModel & privateMessageModel() const
This is is part of datamodel for storing comments of user profiles.
Definition: profilecommentmodel.h:38
PrivMessageModel * iPrivMsgModel
Definition: mockup_model.h:93
This is is part of datamodel for storing private messages.
Definition: privmsgmodel.h:51
QMutex iMutex
Definition: mockup_model.h:89
virtual SearchModel * searchModel() const
MockUpModel(MController *aMController)
This is part of datamodel for storage/retrieval of classified ads.
Definition: camodel.h:40
MController * iController
Definition: mockup_model.h:88
Pure-virtual interface of datamodel for message parser to use.
Definition: mmodelprotocolinterface.h:45
MockUpNodeModel * iNodeModel
Definition: mockup_model.h:85
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:43
virtual ClassifiedAdsModel & classifiedAdsModel() const
SearchModel * iSearchModel
Definition: mockup_model.h:96
not a real datamodel. debugging aid.
Definition: mockup_model.h:39
virtual BinaryFileModel & binaryFileModel() const
ProfileCommentModel * iProfileCommentModel
Definition: mockup_model.h:95
This is is part of datamodel for storing user profiles.
Definition: profilemodel.h:39
virtual ContentEncryptionModel & contentEncryptionModel() const
BinaryFileModel * iBinaryFileModel
Definition: mockup_model.h:91
ContentEncryptionModel * iContentEncryptionModel
Definition: mockup_model.h:94
Work queue item.
Definition: netrequestexecutor.h:60
ProfileModel * iProfileModel
Definition: mockup_model.h:90
virtual ProfileModel & profileModel() const
virtual ProfileCommentModel & profileCommentModel() const
Pure-virtual interface of nodemodel.
Definition: mnodemodelprotocolinterface.h:39
ClassifiedAdsModel * iCAModel
Definition: mockup_model.h:92
This is part of datamodel for any binary blobs.
Definition: binaryfilemodel.h:39
This is content-crypto-operations-specific part of the datamodel.
Definition: contentencryptionmodel.h:37
not a real part datamodel. debugging aid.
Definition: mockup_nodemodel.h:32