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-2017.
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 M_MODEL_PROTOCOL_INTERFACE_H
22 #define M_MODEL_PROTOCOL_INTERFACE_H
23 #include <QObject>
24 #include "../mcontroller.h"
25 #include "netrequestexecutor.h"
27 
29 class ProfileModel ;
30 class BinaryFileModel ;
31 class ClassifiedAdsModel ;
32 class PrivMessageModel ;
34 class ProfileCommentModel ;
35 class SearchModel ;
36 class CaDbRecordModel ;
37 class TclModel ;
46 class MModelProtocolInterface : public QObject {
47  Q_OBJECT
48 public:
55  aRequest) const = 0 ;
59  virtual bool lock() = 0 ;
63  virtual void unlock() = 0 ;
67  virtual MNodeModelProtocolInterface& nodeModel() const = 0 ;
71  virtual ProfileModel& profileModel() const = 0 ;
75  virtual BinaryFileModel& binaryFileModel() const = 0 ;
77  virtual ClassifiedAdsModel& classifiedAdsModel() const = 0 ;
79  virtual PrivMessageModel& privateMessageModel() const = 0 ;
81  virtual ContentEncryptionModel& contentEncryptionModel() const = 0 ;
82  virtual ProfileCommentModel& profileCommentModel() const = 0 ;
83  virtual SearchModel* searchModel() const = 0 ;
84  virtual CaDbRecordModel* caDbRecordModel() const = 0 ;
85  virtual TclModel& tclModel() const = 0 ;
86 };
87 #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:45
This is is part of datamodel for storing comments of user profiles.
Definition: profilecommentmodel.h:38
This is is part of datamodel for storing private messages.
Definition: privmsgmodel.h:51
virtual TclModel & tclModel() const =0
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:40
virtual PrivMessageModel & privateMessageModel() const =0
virtual ProfileModel & profileModel() const =0
Pure-virtual interface of datamodel for message parser to use.
Definition: mmodelprotocolinterface.h:46
virtual void unlock()=0
virtual ProfileCommentModel & profileCommentModel() const =0
This is is part of datamodel for storing user profiles.
Definition: profilemodel.h:39
virtual CaDbRecordModel * caDbRecordModel() const =0
Datamodel-part of storage related to TCL-programs.
Definition: tclmodel.h:38
Work queue item.
Definition: netrequestexecutor.h:60
This is is part of datamodel for storing database records.
Definition: cadbrecordmodel.h:44
Pure-virtual interface of nodemodel.
Definition: mnodemodelprotocolinterface.h:39
virtual BinaryFileModel & binaryFileModel() const =0
This is part of datamodel for any binary blobs.
Definition: binaryfilemodel.h:39
virtual bool lock()=0
This is content-crypto-operations-specific part of the datamodel.
Definition: contentencryptionmodel.h:37