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
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 MOCKUP_CONTROLLER_H
22 #define MOCKUP_CONTROLLER_H
23 #include <QtGui>
24 #include <QBoxLayout>
25 #include "../mcontroller.h"
26 #include "mockup_model.h"
27 class MockUpVoiceCallEngine ;
28 
32 class MockUpController : public MController {
33  Q_OBJECT
34 
35 public:
36 
54  virtual void userInterfaceAction ( CAUserInterfaceRequest aRequest,
55  const Hash& aHashConcerned = KNullHash,
56  const Hash& aFetchFromNode = KNullHash,
57  const QString* aAdditionalInformation = NULL ) ;
61  virtual void hideUI() ;
65  virtual void showUI() ;
66 public slots:
67  virtual void exitApp() ;
68  virtual void displayAboutBox() ;
69  virtual void displayFront() ;
76  virtual void handleError(MController::CAErrorSituation aError,
77  const QString& aExplanation) ;
82  virtual Node& getNode() const ;
87  virtual NetworkListener *networkListener() const ;
88  virtual Model& model() const ;
89  virtual void setProfileInUse(const Hash& aProfileHash) ;
90  const Hash& profileInUse() ;
91  virtual void setContentKeyPasswd(QString aPasswd) ;
95  virtual QString contentKeyPasswd() const ;
96 
97 
98  virtual void startRetrievingContent(NetworkRequestExecutor::NetworkRequestQueueItem aReq,bool aIsBackgroundDl, ProtocolItemType aTypeOfExpectedObject) ;
99 
100 
101  virtual void storePrivateDataOfSelectedProfile(bool aPublishTrustListToo = false) ;
102 
103 
104  virtual void reStorePrivateDataOfSelectedProfile() ;
105 
106 
107  virtual bool isContactInContactList(const Hash& aFingerPrint) const;
108 
109 
110  virtual QString displayableNameForProfile(const Hash& aProfileFingerPrint) const ;
111 
112  virtual void offerDisplayNameForProfile(const Hash& aProfileFingerPrint,
113  const QString& aDisplayName,
114  const bool iUpdatePersistenStorage=false) ;
118  virtual void displayFileInfoOnUi(const BinaryFile& aFileMetadata) ;
124  virtual VoiceCallEngine* voiceCallEngine() { return NULL ; }
125 
137 private:
141  QString iContentPasswd ;
144 } ;
145 #endif
146 
Hash iProfileHash
Definition: mockup_controller.h:142
virtual bool isContactInContactList(const Hash &aFingerPrint) const
Pure-virtual interface for voice call engine.
Definition: mvoicecallengine.h:33
virtual void setProfileInUse(const Hash &aProfileHash)
virtual void storePrivateDataOfSelectedProfile(bool aPublishTrustListToo=false)
virtual QString displayableNameForProfile(const Hash &aProfileFingerPrint) const
Node is a peer in network.
Definition: node.h:40
MockUpVoiceCallEngine * voiceCallEngineMockUp()
Definition: mockup_controller.h:136
virtual void userInterfaceAction(CAUserInterfaceRequest aRequest, const Hash &aHashConcerned=KNullHash, const Hash &aFetchFromNode=KNullHash, const QString *aAdditionalInformation=NULL)
virtual void hideUI()
virtual QString contentKeyPasswd() const
CAUserInterfaceRequest
Definition: mcontroller.h:65
virtual void handleError(MController::CAErrorSituation aError, const QString &aExplanation)
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:38
CAErrorSituation
Definition: mcontroller.h:52
Node * iNode
Definition: mockup_controller.h:138
virtual void exitApp()
virtual VoiceCallEngine * voiceCallEngine()
Definition: mockup_controller.h:124
Definition: mockup_voicecallengine.h:27
ProtocolItemType
Definition: protocol.h:150
Carrier-class for binary blob.
Definition: binaryfile.h:37
const Hash & profileInUse()
Model * iModel
Definition: mockup_controller.h:139
virtual void reStorePrivateDataOfSelectedProfile()
virtual MVoiceCallEngine * voiceCallEngineInterface()
class for listening to incoming network connections.
Definition: networklistener.h:42
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:43
Hash KNullHash
M of the MVC pattern. Handles permanent storage.
Definition: model.h:48
virtual NetworkListener * networkListener() const
virtual void startRetrievingContent(NetworkRequestExecutor::NetworkRequestQueueItem aReq, bool aIsBackgroundDl, ProtocolItemType aTypeOfExpectedObject)
virtual void setContentKeyPasswd(QString aPasswd)
virtual void displayAboutBox()
virtual void displayFileInfoOnUi(const BinaryFile &aFileMetadata)
Work queue item.
Definition: netrequestexecutor.h:60
QString iContentPasswd
Definition: mockup_controller.h:141
virtual Node & getNode() const
MockUpVoiceCallEngine * iCallEngine
Definition: mockup_controller.h:143
virtual Model & model() const
virtual void showUI()
Controller for testing purposes only. Not included in real binary.
Definition: mockup_controller.h:32
Network-related logic for handling voice channel between nodes.
Definition: voicecallengine.h:53
NetworkListener * iListener
Definition: mockup_controller.h:140