Add new virtual method in the delegates to launch the device, Instantiation meant only to open/register the localdevice

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26326 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes
2008-07-08 18:39:41 +00:00
parent 6be60b2d19
commit 48cca06a81
5 changed files with 26 additions and 8 deletions
@@ -15,7 +15,7 @@ HCIControllerAccessor::HCIControllerAccessor(BPath* path) : HCIDelegate(path)
}
status_t
HCIControllerAccessor::IssueCommand(raw_command* rc, size_t size)
HCIControllerAccessor::IssueCommand(raw_command rc, size_t size)
{
if (GetID() < 0)
@@ -24,3 +24,11 @@ HCIControllerAccessor::IssueCommand(raw_command* rc, size_t size)
return B_ERROR;
}
status_t
HCIControllerAccessor::Launch() {
return B_OK;
}
@@ -17,7 +17,8 @@ class HCIControllerAccessor : public HCIDelegate {
public:
HCIControllerAccessor(BPath* path);
status_t IssueCommand(raw_command* rc, size_t size);
status_t IssueCommand(raw_command rc, size_t size);
status_t Launch();
};
#endif
+5 -6
View File
@@ -41,16 +41,15 @@ class HCIDelegate {
}
hci_id GetID(void)
{
return fHID;
}
virtual status_t IssueCommand(raw_command rc, size_t size)
{
return B_ERROR;
}
virtual status_t IssueCommand(raw_command rc, size_t size)=0;
virtual status_t Launch()=0;
protected:
@@ -33,3 +33,11 @@ printf("### \n");
return ioctl(fFD, ISSUE_BT_COMMAND, rc, size);
}
status_t
HCITransportAccessor::Launch() {
return B_OK;
}
@@ -17,6 +17,8 @@ class HCITransportAccessor : public HCIDelegate {
public:
HCITransportAccessor(BPath* path);
status_t IssueCommand(raw_command rc, size_t size);
status_t Launch();
};
#endif