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
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 
45 class MModelProtocolInterface : public QObject {
46  Q_OBJECT
47 public:
54  aRequest) const = 0 ;
58  virtual bool lock() = 0 ;
62  virtual void unlock() = 0 ;
66  virtual MNodeModelProtocolInterface& nodeModel() const = 0 ;
70  virtual ProfileModel& profileModel() const = 0 ;
74  virtual BinaryFileModel& binaryFileModel() const = 0 ;
76  virtual ClassifiedAdsModel& classifiedAdsModel() const = 0 ;
78  virtual PrivMessageModel& privateMessageModel() const = 0 ;
80  virtual ContentEncryptionModel& contentEncryptionModel() const = 0 ;
81  virtual ProfileCommentModel& profileCommentModel() const = 0 ;
82  virtual SearchModel* searchModel() const = 0 ;
83 };
84 #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 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:45
virtual void unlock()=0
virtual ProfileCommentModel & profileCommentModel() const =0
This is is part of datamodel for storing user profiles.
Definition: profilemodel.h:39
Work queue item.
Definition: netrequestexecutor.h:60
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