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 status_t
HCIControllerAccessor::IssueCommand(raw_command* rc, size_t size) HCIControllerAccessor::IssueCommand(raw_command rc, size_t size)
{ {
if (GetID() < 0) if (GetID() < 0)
@@ -24,3 +24,11 @@ HCIControllerAccessor::IssueCommand(raw_command* rc, size_t size)
return B_ERROR; return B_ERROR;
} }
status_t
HCIControllerAccessor::Launch() {
return B_OK;
}
@@ -17,7 +17,8 @@ class HCIControllerAccessor : public HCIDelegate {
public: public:
HCIControllerAccessor(BPath* path); 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 #endif
+3 -4
View File
@@ -41,15 +41,14 @@ class HCIDelegate {
} }
hci_id GetID(void) hci_id GetID(void)
{ {
return fHID; return fHID;
} }
virtual status_t IssueCommand(raw_command rc, size_t size) virtual status_t IssueCommand(raw_command rc, size_t size)=0;
{ virtual status_t Launch()=0;
return B_ERROR;
}
protected: protected:
@@ -33,3 +33,11 @@ printf("### \n");
return ioctl(fFD, ISSUE_BT_COMMAND, rc, size); return ioctl(fFD, ISSUE_BT_COMMAND, rc, size);
} }
status_t
HCITransportAccessor::Launch() {
return B_OK;
}
@@ -17,6 +17,8 @@ class HCITransportAccessor : public HCIDelegate {
public: public:
HCITransportAccessor(BPath* path); HCITransportAccessor(BPath* path);
status_t IssueCommand(raw_command rc, size_t size); status_t IssueCommand(raw_command rc, size_t size);
status_t Launch();
}; };
#endif #endif