Classified ads
mmodelprotocolinterface.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 M_MODEL_PROTOCOL_INTERFACE_H
21 #define M_MODEL_PROTOCOL_INTERFACE_H
22 #include <QObject>
23 #include "../mcontroller.h"
24 #include "netrequestexecutor.h"
26 
28 class ProfileModel ;
29 class BinaryFileModel ;
30 class ClassifiedAdsModel ;
31 class PrivMessageModel ;
33 class ProfileCommentModel ;
34 class SearchModel ;
35 
44 class MModelProtocolInterface : public QObject {
45  Q_OBJECT
46 public:
53  aRequest) const = 0 ;
57  virtual bool lock() = 0 ;
61  virtual void unlock() = 0 ;
65  virtual MNodeModelProtocolInterface& nodeModel() const = 0 ;
69  virtual ProfileModel& profileModel() const = 0 ;
73  virtual BinaryFileModel& binaryFileModel() const = 0 ;
75  virtual ClassifiedAdsModel& classifiedAdsModel() const = 0 ;
77  virtual PrivMessageModel& privateMessageModel() const = 0 ;
79  virtual ContentEncryptionModel& contentEncryptionModel() const = 0 ;
80  virtual ProfileCommentModel& profileCommentModel() const = 0 ;
81  virtual SearchModel* searchModel() const = 0 ;
82 };
83 #endif
virtual void addNetworkRequest(NetworkRequestExecutor::NetworkRequestQueueItem &aRequest) const =0
virtual SearchModel * searchModel() const =0
Model-class for performing text-based searches on objects in db This datamodel part is dual-use ; it ...
Definition: searchmodel.h:44
This is is part of datamodel for storing comments of user profiles.
Definition: profilecommentmodel.h:37
This is is part of datamodel for storing private messages.
Definition: privmsgmodel.h:50
virtual MNodeModelProtocolInterface & nodeModel() const =0
virtual ClassifiedAdsModel & classifiedAdsModel() const =0
virtual ContentEncryptionModel & contentEncryptionModel() const =0
This is part of datamodel for storage/retrieval of classified ads.
Definition: camodel.h:38
virtual PrivMessageModel & privateMessageModel() const =0
virtual ProfileModel & profileModel() const =0
Pure-virtual interface of datamodel for message parser to use.
Definition: mmodelprotocolinterface.h:44
virtual void unlock()=0
virtual ProfileCommentModel & profileCommentModel() const =0
This is is part of datamodel for storing user profiles.
Definition: profilemodel.h:38
Work queue item.
Definition: netrequestexecutor.h:59
Pure-virtual interface of nodemodel.
Definition: mnodemodelprotocolinterface.h:38
virtual BinaryFileModel & binaryFileModel() const =0
This is part of datamodel for any binary blobs.
Definition: binaryfilemodel.h:38
virtual bool lock()=0
This is content-crypto-operations-specific part of the datamodel.
Definition: contentencryptionmodel.h:36