haiku/headers/private/debugger/target_host_interface/TargetHostInterface.h

130 lines
3.3 KiB
C
Raw Normal View History

/*
* Copyright 2016, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
#ifndef TARGET_HOST_INTERFACE_H
#define TARGET_HOST_INTERFACE_H
#include <OS.h>
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
#include <Looper.h>
#include <ObjectList.h>
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
#include <util/DoublyLinkedList.h>
#include "controllers/TeamDebugger.h"
class DebuggerInterface;
class Settings;
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
class SettingsManager;
class TargetHost;
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
struct TeamDebuggerOptions;
class UserInterface;
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
class TargetHostInterface : public BLooper, private TeamDebugger::Listener {
public:
class Listener;
TargetHostInterface();
virtual ~TargetHostInterface();
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
status_t StartTeamDebugger(const TeamDebuggerOptions& options);
int32 CountTeamDebuggers() const;
TeamDebugger* TeamDebuggerAt(int32 index) const;
TeamDebugger* FindTeamDebugger(team_id team) const;
status_t AddTeamDebugger(TeamDebugger* debugger);
void RemoveTeamDebugger(TeamDebugger* debugger);
virtual status_t Init(Settings* settings) = 0;
virtual void Close() = 0;
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
virtual bool IsLocal() const = 0;
virtual bool Connected() const = 0;
virtual TargetHost* GetTargetHost() = 0;
virtual status_t Attach(team_id id, thread_id threadID,
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
DebuggerInterface*& _interface) const = 0;
virtual status_t CreateTeam(int commandLineArgc,
const char* const* arguments,
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
team_id& _teamID) const = 0;
virtual status_t LoadCore(const char* coreFilePath,
DebuggerInterface*& _interface,
thread_id& _thread) const = 0;
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
virtual status_t FindTeamByThread(thread_id thread,
team_id& _teamID) const = 0;
void AddListener(Listener* listener);
void RemoveListener(Listener* listener);
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
// BLooper
virtual void Quit();
virtual void MessageReceived(BMessage* message);
private:
// TeamDebugger::Listener
virtual void TeamDebuggerStarted(TeamDebugger* debugger);
virtual void TeamDebuggerRestartRequested(
TeamDebugger* debugger);
virtual void TeamDebuggerQuit(TeamDebugger* debugger);
private:
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
status_t _StartTeamDebugger(team_id teamID,
const TeamDebuggerOptions& options,
bool stopInMain);
void _NotifyTeamDebuggerStarted(
TeamDebugger* debugger);
void _NotifyTeamDebuggerQuit(
TeamDebugger* debugger);
static int _CompareDebuggers(const TeamDebugger* a,
const TeamDebugger* b);
private:
typedef DoublyLinkedList<Listener> ListenerList;
typedef BObjectList<TeamDebugger> TeamDebuggerList;
private:
ListenerList fListeners;
TeamDebuggerList fTeamDebuggers;
};
class TargetHostInterface::Listener
: public DoublyLinkedListLinkImpl<Listener> {
public:
virtual ~Listener();
virtual void TeamDebuggerStarted(TeamDebugger* debugger);
virtual void TeamDebuggerQuit(TeamDebugger* debugger);
virtual void TargetHostInterfaceQuit(
TargetHostInterface* interface);
};
enum {
TEAM_DEBUGGER_REQUEST_UNKNOWN = 0,
TEAM_DEBUGGER_REQUEST_CREATE,
TEAM_DEBUGGER_REQUEST_ATTACH,
TEAM_DEBUGGER_REQUEST_LOAD_CORE
};
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
struct TeamDebuggerOptions {
TeamDebuggerOptions();
int requestType;
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
int commandLineArgc;
const char* const* commandLineArgv;
team_id team;
thread_id thread;
SettingsManager* settingsManager;
UserInterface* userInterface;
const char* coreFilePath;
Debugger: Rework to fully use TargetHostInterface. Application objects: - Rework and simplify to take into account that they will no longer be directly managing the team debugger list. Requests to start a new debugger are still funnelled through here however, and as such, said requests must now provide the appropriate target host to start with. Adjust StartTeamWindow and TeamsWindow accordingly. - On global init, always create an instance of the local interface. TargetHostInterface: - Convert to BLooper and implement TeamDebugger's Listener interface. TargetHostInterfaces now directly manage their TeamDebugger instances, and consequently take over the equivalent duties that the main application previously had. - Adjust signatures of Attach/CreateTeam to add const. Adjust LocalTargetHostInterface accordingly. - Add accessor to determine if a given interface is local or not. Will be needed for the TeamDebugger's file manager eventually so it knows if it needs to request remote files if no matching local file is found. - Add accessor to start a TeamDebugger instance, and corresponding options structure. TargetHostInterfaceRoster: - Minor adjustments to host interface initialization to take into account needing to start the looper. - Add accessor for number of running team debuggers, for the main app to use when deciding to quit. TeamDebugger: - Add accessor for SettingsManager. Needed for the case of a restart request, as the host interfaces do not have direct access to it. TeamsWindow: - For now, always grab the local host interface when initializing the window. Once the remote interface is implemented, this will need to be adjusted, but the appropriate UI for creating/selecting it is needed first anyways. With these changes, the main application is fully host-agnostic, and all management of actual debuggers is delegated to their parent host interfaces. There still needs to be a listener interface for the host interface and/or roster though, so that the application can be made aware of when debuggers quit, as this drives whether it's time to terminate the app or not.
2016-04-21 02:23:01 +03:00
};
#endif // TARGET_HOST_INTERFACE_H