From 20616c59c121f5ae49a83d8a7542537c18a08a28 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Thu, 3 Nov 2011 10:42:56 +0000 Subject: [PATCH] Add stubs for the eventual command line interface. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43156 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/Jamfile | 4 + .../cli/CommandLineUserInterface.cpp | 73 +++++++++++++++++++ .../cli/CommandLineUserInterface.h | 39 ++++++++++ 3 files changed, 116 insertions(+) create mode 100644 src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp create mode 100644 src/apps/debugger/user_interface/cli/CommandLineUserInterface.h diff --git a/src/apps/debugger/Jamfile b/src/apps/debugger/Jamfile index 61b1ad7161..c78bd435b8 100644 --- a/src/apps/debugger/Jamfile +++ b/src/apps/debugger/Jamfile @@ -19,6 +19,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) settings generic ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) source_language ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) types ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface cli ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui inspector_window ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui model ] ; @@ -171,6 +172,9 @@ Application Debugger : # user_interface/gui GraphicalUserInterface.cpp + # user_interface/cli + CommandLineUserInterface.cpp + # user_interface/gui/model VariablesViewState.cpp VariablesViewStateHistory.cpp diff --git a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp new file mode 100644 index 0000000000..95fd5f29fb --- /dev/null +++ b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp @@ -0,0 +1,73 @@ +/* + * Copyright 2011, Rene Gollent, rene@gollent.com. + * Distributed under the terms of the MIT License. + */ + + +#include "CommandLineUserInterface.h" + + +CommandLineUserInterface::CommandLineUserInterface() +{ +} + + +CommandLineUserInterface::~CommandLineUserInterface() +{ +} + + +const char* +CommandLineUserInterface::ID() const +{ + return "BasicCommandLineUserInterface"; +} + + +status_t +CommandLineUserInterface::Init(Team* team, UserInterfaceListener* listener) +{ + return B_UNSUPPORTED; +} + + +void +CommandLineUserInterface::Show() +{ +} + + +void +CommandLineUserInterface::Terminate() +{ +} + + +status_t +CommandLineUserInterface::LoadSettings(const TeamUISettings* settings) +{ + return B_UNSUPPORTED; +} + + +status_t +CommandLineUserInterface::SaveSettings(TeamUISettings*& settings) const +{ + return B_UNSUPPORTED;; +} + + +void +CommandLineUserInterface::NotifyUser(const char* title, const char* message, + user_notification_type type) +{ +} + + +int32 +CommandLineUserInterface::SynchronouslyAskUser(const char* title, + const char* message, const char* choice1, const char* choice2, + const char* choice3) +{ + return 0; +} diff --git a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h new file mode 100644 index 0000000000..4d04a7c2ee --- /dev/null +++ b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h @@ -0,0 +1,39 @@ +/* + * Copyright 2011, Rene Gollent, rene@gollent.com. + * Distributed under the terms of the MIT License. + */ +#ifndef COMMAND_LINE_USER_INTERFACE_H +#define COMMAND_LINE_USER_INTERFACE_H + + +#include "UserInterface.h" + + +class CommandLineUserInterface : public UserInterface { +public: + CommandLineUserInterface(); + virtual ~CommandLineUserInterface(); + + virtual const char* ID() const; + + virtual status_t Init(Team* team, + UserInterfaceListener* listener); + virtual void Show(); + virtual void Terminate(); + // shut down the UI *now* -- no more user + // feedback + + virtual status_t LoadSettings(const TeamUISettings* settings); + virtual status_t SaveSettings(TeamUISettings*& settings) const; + + virtual void NotifyUser(const char* title, + const char* message, + user_notification_type type); + virtual int32 SynchronouslyAskUser(const char* title, + const char* message, const char* choice1, + const char* choice2, const char* choice3); + +}; + + +#endif // COMMAND_LINE_USER_INTERFACE_H