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:
@@ -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
|
||||||
|
|||||||
@@ -41,16 +41,15 @@ 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
|
||||||
|
|||||||
Reference in New Issue
Block a user