1 /*
2 * Copyright 2016-2017, Rene Gollent, rene@gollent.com.
3 * Copyright 2016, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Distributed under the terms of the MIT License.
5 */
6
7 #include "NetworkTargetHostInterface.h"
8
9 #include <AutoDeleter.h>
10 #include <AutoLocker.h>
11 #include <system_info.h>
12 #include <util/KMessage.h>
13
14 #include "debug_utils.h"
15
16 #include "TargetHost.h"
17
18
NetworkTargetHostInterface()19 NetworkTargetHostInterface::NetworkTargetHostInterface()
20 :
21 TargetHostInterface(),
22 fTargetHost(NULL)
23 {
24 SetName("Network");
25 }
26
27
~NetworkTargetHostInterface()28 NetworkTargetHostInterface::~NetworkTargetHostInterface()
29 {
30 Close();
31
32 if (fTargetHost != NULL)
33 fTargetHost->ReleaseReference();
34 }
35
36
37 status_t
Init(Settings * settings)38 NetworkTargetHostInterface::Init(Settings* settings)
39 {
40 return B_NOT_SUPPORTED;
41 }
42
43
44 void
Close()45 NetworkTargetHostInterface::Close()
46 {
47 }
48
49
50 bool
IsLocal() const51 NetworkTargetHostInterface::IsLocal() const
52 {
53 return false;
54 }
55
56
57 bool
Connected() const58 NetworkTargetHostInterface::Connected() const
59 {
60 return false;
61 }
62
63
64 TargetHost*
GetTargetHost()65 NetworkTargetHostInterface::GetTargetHost()
66 {
67 return fTargetHost;
68 }
69
70
71 status_t
Attach(team_id teamID,thread_id threadID,DebuggerInterface * & _interface) const72 NetworkTargetHostInterface::Attach(team_id teamID, thread_id threadID,
73 DebuggerInterface*& _interface) const
74 {
75 return B_NOT_SUPPORTED;
76 }
77
78
79 status_t
CreateTeam(int commandLineArgc,const char * const * arguments,team_id & _teamID) const80 NetworkTargetHostInterface::CreateTeam(int commandLineArgc,
81 const char* const* arguments, team_id& _teamID) const
82 {
83 return B_NOT_SUPPORTED;
84 }
85
86
87 status_t
LoadCore(const char * coreFilePath,DebuggerInterface * & _interface,thread_id & _thread) const88 NetworkTargetHostInterface::LoadCore(const char* coreFilePath,
89 DebuggerInterface*& _interface, thread_id& _thread) const
90 {
91 return B_NOT_SUPPORTED;
92 }
93
94
95 status_t
FindTeamByThread(thread_id thread,team_id & _teamID) const96 NetworkTargetHostInterface::FindTeamByThread(thread_id thread,
97 team_id& _teamID) const
98 {
99 return B_NOT_SUPPORTED;
100 }
101