Debugger: Add dedicated functions for global {un}init.
[haiku.git] / src / apps / debugger / target_host_interface / local / LocalTargetHostInterfaceInfo.cpp
blob8940496ff8edeeff4d77692947d863ce7c89e4c6
1 /*
2 * Copyright 2016, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
5 #include "LocalTargetHostInterfaceInfo.h"
7 #include "LocalTargetHostInterface.h"
10 LocalTargetHostInterfaceInfo::LocalTargetHostInterfaceInfo()
12 TargetHostInterfaceInfo("Local")
17 LocalTargetHostInterfaceInfo::~LocalTargetHostInterfaceInfo()
22 status_t
23 LocalTargetHostInterfaceInfo::Init()
25 return B_OK;
29 bool
30 LocalTargetHostInterfaceInfo::IsLocal() const
32 return true;
36 bool
37 LocalTargetHostInterfaceInfo::IsConfigured(Settings* settings) const
39 return true;
43 SettingsDescription*
44 LocalTargetHostInterfaceInfo::GetSettingsDescription() const
46 // the local interface requires no configuration, therefore
47 // it returns no settings description, and has no real work
48 // to do as far as settings validation is concerned.
49 return NULL;
53 status_t
54 LocalTargetHostInterfaceInfo::CreateInterface(Settings* settings,
55 TargetHostInterface*& _interface) const
57 LocalTargetHostInterface* interface
58 = new(std::nothrow) LocalTargetHostInterface;
59 if (interface == NULL)
60 return B_NO_MEMORY;
62 status_t error = interface->Init(settings);
63 if (error != B_OK) {
64 delete interface;
65 return error;
68 _interface = interface;
69 return B_OK;