SenseApiMgr: Refcount device spec objects
This commit is contained in:
@@ -30,10 +30,11 @@ struct WindowSelector
|
||||
class AttachedWindow
|
||||
{
|
||||
public:
|
||||
AttachedWindow(const smo::device::SenseDeviceSpec& spec);
|
||||
AttachedWindow(const std::shared_ptr<smo::device::SenseDeviceSpec>& spec);
|
||||
~AttachedWindow();
|
||||
|
||||
const smo::device::SenseDeviceSpec& getDeviceSpec() const { return deviceSpec; }
|
||||
const std::shared_ptr<smo::device::SenseDeviceSpec>& getDeviceSpec() const
|
||||
{ return deviceSpec; }
|
||||
const WindowSelector& getWindowSelector() const { return windowSelector; }
|
||||
const std::string& getActualWindowName() const { return actualWindowName; }
|
||||
void* getXcbConnection() const { return xcbConnectionShared.get(); }
|
||||
@@ -41,10 +42,11 @@ public:
|
||||
|
||||
private:
|
||||
void parseWindowSelector(const smo::device::SenseDeviceSpec& spec);
|
||||
int getRequiredParamAsInt(const smo::device::SenseDeviceSpec& spec,
|
||||
const std::string& paramName);
|
||||
int getRequiredParamAsInt(
|
||||
const smo::device::SenseDeviceSpec& spec,
|
||||
const std::string& paramName);
|
||||
|
||||
smo::device::SenseDeviceSpec deviceSpec;
|
||||
std::shared_ptr<smo::device::SenseDeviceSpec> deviceSpec;
|
||||
WindowSelector windowSelector;
|
||||
std::string actualWindowName;
|
||||
std::shared_ptr<xcb_xorg::XcbConnection> xcbConnectionShared;
|
||||
|
||||
Reference in New Issue
Block a user