Classified ads
mockup_controller.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_CONTROLLER_H
21 #define MOCKUP_CONTROLLER_H
22 #include <QtGui>
23 #include <QBoxLayout>
24 #include "../mcontroller.h"
25 #include "mockup_model.h"
26 
31 {
32  Q_OBJECT
33 
34 public:
35 
39  MockUpController() ;
53  virtual void userInterfaceAction ( CAUserInterfaceRequest aRequest,
54  const Hash& aHashConcerned = KNullHash,
55  const Hash& aFetchFromNode = KNullHash ) ;
59  virtual void hideUI() ;
63  virtual void showUI() ;
64  public slots:
65  virtual void exitApp() ;
66  virtual void displayAboutBox() ;
67  virtual void displayFront() ;
74  virtual void handleError(MController::CAErrorSituation aError,
75  const QString& aExplanation) ;
80  virtual Node& getNode() const ;
85  virtual NetworkListener *networkListener() const ;
86  virtual Model& model() const ;
87  virtual void setProfileInUse(const Hash& aProfileHash) ;
88  const Hash& profileInUse() ;
89  virtual void setContentKeyPasswd(QString aPasswd) ;
93  virtual QString contentKeyPasswd() const ;
94 
95 
96  virtual void startRetrievingContent(NetworkRequestExecutor::NetworkRequestQueueItem aReq,bool aIsBackgroundDl) ;
97 
98 
99  virtual void storePrivateDataOfSelectedProfile() ;
100 
101 
102  virtual void reStorePrivateDataOfSelectedProfile() ;
103 
104 
105  virtual bool isContactInContactList(const Hash& aFingerPrint) const;
106 
107 
108  virtual QString displayableNameForProfile(const Hash& aProfileFingerPrint) const ;
109 
110  virtual void offerDisplayNameForProfile(const Hash& aProfileFingerPrint,
111  const QString& aDisplayName,
112  const bool iUpdatePersistenStorage=false) ;
113 
114 private:
118  QString iContentPasswd ;
120 } ;
121 #endif
122 
Hash iProfileHash
Definition: mockup_controller.h:119
virtual bool isContactInContactList(const Hash &aFingerPrint) const
virtual void setProfileInUse(const Hash &aProfileHash)
virtual QString displayableNameForProfile(const Hash &aProfileFingerPrint) const
Node is a peer in network.
Definition: node.h:39
virtual void hideUI()
virtual QString contentKeyPasswd() const
virtual void userInterfaceAction(CAUserInterfaceRequest aRequest, const Hash &aHashConcerned=KNullHash, const Hash &aFetchFromNode=KNullHash)
CAUserInterfaceRequest
Definition: mcontroller.h:61
virtual void startRetrievingContent(NetworkRequestExecutor::NetworkRequestQueueItem aReq, bool aIsBackgroundDl)
virtual void handleError(MController::CAErrorSituation aError, const QString &aExplanation)
virtual void storePrivateDataOfSelectedProfile()
virtual void displayFront()
virtual void offerDisplayNameForProfile(const Hash &aProfileFingerPrint, const QString &aDisplayName, const bool iUpdatePersistenStorage=false)
Hash is class that carries 160-bit digest.
Definition: hash.h:37
CAErrorSituation
Definition: mcontroller.h:48
Node * iNode
Definition: mockup_controller.h:115
virtual void exitApp()
const Hash & profileInUse()
Model * iModel
Definition: mockup_controller.h:116
virtual void reStorePrivateDataOfSelectedProfile()
class for listening to incoming network connections.
Definition: networklistener.h:40
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:39
Hash KNullHash
M of the MVC pattern. Handles permanent storage.
Definition: model.h:47
virtual NetworkListener * networkListener() const
virtual void setContentKeyPasswd(QString aPasswd)
virtual void displayAboutBox()
Work queue item.
Definition: netrequestexecutor.h:59
QString iContentPasswd
Definition: mockup_controller.h:118
virtual Node & getNode() const
virtual Model & model() const
virtual void showUI()
Controller for testing purposes only. Not included in real binary.
Definition: mockup_controller.h:30
NetworkListener * iListener
Definition: mockup_controller.h:117