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 modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (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
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Classified Ads. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef MOCKUP_MODEL_H
21 #define MOCKUP_MODEL_H
22 #include "../mcontroller.h"
23 #include "../datamodel/mmodelprotocolinterface.h"
24 #include "../datamodel/mnodemodelprotocolinterface.h"
25 #include <QMutex>
26 class MockUpNodeModel ;
27 class ProfileModel ;
28 class BinaryFileModel ;
29 class ClassifiedAdsModel ;
30 class PrivMessageModel ;
32 class ProfileCommentModel ;
33 class SearchModel;
34 
39 {
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:44
virtual PrivMessageModel & privateMessageModel() const
This is is part of datamodel for storing comments of user profiles.
Definition: profilecommentmodel.h:37
PrivMessageModel * iPrivMsgModel
Definition: mockup_model.h:93
This is is part of datamodel for storing private messages.
Definition: privmsgmodel.h:50
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:38
MController * iController
Definition: mockup_model.h:88
Pure-virtual interface of datamodel for message parser to use.
Definition: mmodelprotocolinterface.h:44
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:39
virtual ClassifiedAdsModel & classifiedAdsModel() const
SearchModel * iSearchModel
Definition: mockup_model.h:96
not a real datamodel. debugging aid.
Definition: mockup_model.h:38
virtual BinaryFileModel & binaryFileModel() const
ProfileCommentModel * iProfileCommentModel
Definition: mockup_model.h:95
This is is part of datamodel for storing user profiles.
Definition: profilemodel.h:38
virtual ContentEncryptionModel & contentEncryptionModel() const
BinaryFileModel * iBinaryFileModel
Definition: mockup_model.h:91
ContentEncryptionModel * iContentEncryptionModel
Definition: mockup_model.h:94
Work queue item.
Definition: netrequestexecutor.h:59
ProfileModel * iProfileModel
Definition: mockup_model.h:90
virtual ProfileModel & profileModel() const
virtual ProfileCommentModel & profileCommentModel() const
Pure-virtual interface of nodemodel.
Definition: mnodemodelprotocolinterface.h:38
ClassifiedAdsModel * iCAModel
Definition: mockup_model.h:92
This is part of datamodel for any binary blobs.
Definition: binaryfilemodel.h:38
This is content-crypto-operations-specific part of the datamodel.
Definition: contentencryptionmodel.h:36
not a real part datamodel. debugging aid.
Definition: mockup_nodemodel.h:31