Classified ads
Public Slots | Public Member Functions | Private Attributes | List of all members
MockUpController Class Reference

Controller for testing purposes only. Not included in real binary. More...

#include <mockup_controller.h>

Inheritance diagram for MockUpController:
Inheritance graph
[legend]
Collaboration diagram for MockUpController:
Collaboration graph
[legend]

Public Slots

virtual void exitApp ()
 
virtual void displayAboutBox ()
 
virtual void displayFront ()
 
virtual void handleError (MController::CAErrorSituation aError, const QString &aExplanation)
 
virtual NodegetNode () const
 
virtual NetworkListenernetworkListener () const
 
virtual Modelmodel () const
 
virtual void setProfileInUse (const Hash &aProfileHash)
 
const HashprofileInUse ()
 
virtual void setContentKeyPasswd (QString aPasswd)
 
virtual QString contentKeyPasswd () const
 
virtual void startRetrievingContent (NetworkRequestExecutor::NetworkRequestQueueItem aReq, bool aIsBackgroundDl, ProtocolItemType aTypeOfExpectedObject)
 
virtual void storePrivateDataOfSelectedProfile (bool aPublishTrustListToo=false)
 
virtual void reStorePrivateDataOfSelectedProfile ()
 
virtual bool isContactInContactList (const Hash &aFingerPrint) const
 
virtual QString displayableNameForProfile (const Hash &aProfileFingerPrint) const
 
virtual void offerDisplayNameForProfile (const Hash &aProfileFingerPrint, const QString &aDisplayName, const bool iUpdatePersistenStorage=false)
 
virtual void displayFileInfoOnUi (const BinaryFile &aFileMetadata)
 
virtual VoiceCallEnginevoiceCallEngine ()
 
virtual MVoiceCallEnginevoiceCallEngineInterface ()
 
MockUpVoiceCallEnginevoiceCallEngineMockUp ()
 
- Public Slots inherited from MController
virtual void exitApp ()=0
 
virtual void displayAboutBox ()=0
 
virtual void displayFront ()=0
 
virtual void handleError (MController::CAErrorSituation aError, const QString &aExplanation)=0
 
virtual NodegetNode () const =0
 
virtual NetworkListenernetworkListener () const =0
 
virtual Modelmodel () const =0
 
virtual void storePrivateDataOfSelectedProfile (bool aPublishTrustListToo=false)=0
 
virtual void reStorePrivateDataOfSelectedProfile ()=0
 
virtual bool isContactInContactList (const Hash &aFingerPrint) const =0
 
virtual QString displayableNameForProfile (const Hash &aProfileFingerPrint) const =0
 
virtual void offerDisplayNameForProfile (const Hash &aProfileFingerPrint, const QString &aDisplayName, const bool iUpdatePersistenStorage=false)=0
 
virtual void displayFileInfoOnUi (const BinaryFile &aFileMetadata)=0
 
virtual VoiceCallEnginevoiceCallEngine ()=0
 
virtual MVoiceCallEnginevoiceCallEngineInterface ()=0
 

Public Member Functions

 MockUpController ()
 
 ~MockUpController ()
 
virtual void userInterfaceAction (CAUserInterfaceRequest aRequest, const Hash &aHashConcerned=KNullHash, const Hash &aFetchFromNode=KNullHash, const QString *aAdditionalInformation=NULL)
 
virtual void hideUI ()
 
virtual void showUI ()
 
- Public Member Functions inherited from MController
virtual void startRetrievingContent (NetworkRequestExecutor::NetworkRequestQueueItem aReq, bool aIsBackgroundDl, ProtocolItemType aTypeOfExpectedObject)=0
 
virtual void setProfileInUse (const Hash &aProfileHash)=0
 
virtual const HashprofileInUse ()=0
 
virtual void setContentKeyPasswd (QString aPasswd)=0
 
virtual QString contentKeyPasswd () const =0
 

Private Attributes

NodeiNode
 
ModeliModel
 
NetworkListeneriListener
 
QString iContentPasswd
 
Hash iProfileHash
 
MockUpVoiceCallEngineiCallEngine
 

Additional Inherited Members

- Public Types inherited from MController
enum  CAErrorSituation {
  OwnCertNotFound, DataBaseNotMountable, BadPassword, DbTransactionError,
  ContentEncryptionError, FileOperationError
}
 
enum  CAUserInterfaceRequest {
  ViewProfileDetails, ViewCa, ViewProfileComment, DisplayProgressDialog,
  VoiceCallToNode
}
 

Detailed Description

Controller for testing purposes only. Not included in real binary.

Constructor & Destructor Documentation

MockUpController::MockUpController ( )

constructor

MockUpController::~MockUpController ( )

Destructor

Member Function Documentation

virtual QString MockUpController::contentKeyPasswd ( ) const
virtualslot

method for getting gpg passwd previously set

virtual QString MockUpController::displayableNameForProfile ( const Hash aProfileFingerPrint) const
virtualslot
virtual void MockUpController::displayAboutBox ( )
virtualslot

bragging

virtual void MockUpController::displayFileInfoOnUi ( const BinaryFile aFileMetadata)
virtualslot

method that puts dialog or similar on display, about a published file

virtual void MockUpController::displayFront ( )
virtualslot

this initializes the "normal" display

virtual void MockUpController::exitApp ( )
virtualslot

quitting

virtual Node& MockUpController::getNode ( ) const
virtualslot

Method for node ; this may be changed during startup-phase but not after that

virtual void MockUpController::handleError ( MController::CAErrorSituation  aError,
const QString &  aExplanation 
)
virtualslot

Method for handling errors inside application.

Parameters
aErrorReason for error call, from error enum above
aExplanationNULL or human-readable description about what went wrong.
virtual void MockUpController::hideUI ( )
virtual

method for hiding UI

Implements MController.

virtual bool MockUpController::isContactInContactList ( const Hash aFingerPrint) const
virtualslot
virtual Model& MockUpController::model ( ) const
virtualslot
virtual NetworkListener* MockUpController::networkListener ( ) const
virtualslot

method for network listener ; it is parent of all connections, also the outgoing

virtual void MockUpController::offerDisplayNameForProfile ( const Hash aProfileFingerPrint,
const QString &  aDisplayName,
const bool  iUpdatePersistenStorage = false 
)
virtualslot
const Hash& MockUpController::profileInUse ( )
slot
virtual void MockUpController::reStorePrivateDataOfSelectedProfile ( )
virtualslot
virtual void MockUpController::setContentKeyPasswd ( QString  aPasswd)
virtualslot
virtual void MockUpController::setProfileInUse ( const Hash aProfileHash)
virtualslot
virtual void MockUpController::showUI ( )
virtual

method for showing UI

Implements MController.

virtual void MockUpController::startRetrievingContent ( NetworkRequestExecutor::NetworkRequestQueueItem  aReq,
bool  aIsBackgroundDl,
ProtocolItemType  aTypeOfExpectedObject 
)
virtualslot
virtual void MockUpController::storePrivateDataOfSelectedProfile ( bool  aPublishTrustListToo = false)
virtualslot
virtual void MockUpController::userInterfaceAction ( CAUserInterfaceRequest  aRequest,
const Hash aHashConcerned = KNullHash,
const Hash aFetchFromNode = KNullHash,
const QString *  aAdditionalInformation = NULL 
)
virtual

Method for requesting different things to take place in UI. controller mostly routes these to FrontWidget but other actions may be in order too..

Parameters
aRequestusers orders
aHashConcernedpossible hash parameter ; can be null hash if action is not about specific hash
Returns
none

Implements MController.

virtual VoiceCallEngine* MockUpController::voiceCallEngine ( )
inlinevirtualslot

Method for getting voice call engine. This particular implementation will return NULL always

Returns
NULL
virtual MVoiceCallEngine* MockUpController::voiceCallEngineInterface ( )
virtualslot

Method that returns a mock-up of the voice call engine. Used for testing the call protocol parts

MockUpVoiceCallEngine* MockUpController::voiceCallEngineMockUp ( )
inlineslot

Getter-method for real voice call engine mock-up. After call data methods have been called, state of this mocku-up is checked so we can determine the success of test cases

Member Data Documentation

MockUpVoiceCallEngine* MockUpController::iCallEngine
private
QString MockUpController::iContentPasswd
private
NetworkListener* MockUpController::iListener
private

Incoming connections handler, for ipv4

Model* MockUpController::iModel
private

data storage animal

Node* MockUpController::iNode
private

our network presence object, there is single instance

Hash MockUpController::iProfileHash
private

The documentation for this class was generated from the following file: