SenseApiDesc: Rename SalmanoffCallbacks=> SmoCallbacks
This commit is contained in:
@@ -21,7 +21,7 @@ namespace sense_api {
|
|||||||
struct SmoThreadingModelDesc
|
struct SmoThreadingModelDesc
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Shared pointer to ComponentThread for device-independent state management.
|
* @brief sh_ptr to ComponentThread for device-independent state mgt.
|
||||||
*
|
*
|
||||||
* This ComponentThread should be used by senseApis for state management
|
* This ComponentThread should be used by senseApis for state management
|
||||||
* that's independent of any particular device or attachment spec.
|
* that's independent of any particular device or attachment spec.
|
||||||
@@ -47,7 +47,7 @@ typedef int (sal_mlo_detachDeviceReqFn)(
|
|||||||
* This structure contains function pointers that senseApi libraries can use
|
* This structure contains function pointers that senseApi libraries can use
|
||||||
* to interact with Salmanoff's functionality, such as searching for commonLibs.
|
* to interact with Salmanoff's functionality, such as searching for commonLibs.
|
||||||
*/
|
*/
|
||||||
struct SalmanoffCallbacks
|
struct SmoCallbacks
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Search for a library in Salmanoff's search paths
|
* @brief Search for a library in Salmanoff's search paths
|
||||||
@@ -155,13 +155,13 @@ public:
|
|||||||
* The SenseApiDesc struct also gives Smo pointers to API functions
|
* The SenseApiDesc struct also gives Smo pointers to API functions
|
||||||
* to invoke for communication between Smo and the library.
|
* to invoke for communication between Smo and the library.
|
||||||
*
|
*
|
||||||
* The SalmanoffCallbacks parameter provides the library with access to
|
* The SmoCallbacks parameter provides the library with access to
|
||||||
* Salmanoff's hooks.
|
* Salmanoff's hooks.
|
||||||
* The SmoThreadingModelDesc parameter provides the library with access to
|
* The SmoThreadingModelDesc parameter provides the library with access to
|
||||||
* the io_service for network operations and event handling.
|
* the io_service for network operations and event handling.
|
||||||
*/
|
*/
|
||||||
typedef const SenseApiDesc &(SMO_GET_SENSE_API_DESC_FN_TYPEDEF)(
|
typedef const SenseApiDesc &(SMO_GET_SENSE_API_DESC_FN_TYPEDEF)(
|
||||||
const SalmanoffCallbacks& callbacks,
|
const SmoCallbacks& callbacks,
|
||||||
const SmoThreadingModelDesc& threadingModel);
|
const SmoThreadingModelDesc& threadingModel);
|
||||||
|
|
||||||
} // namespace sense_api
|
} // namespace sense_api
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ struct XcbXorgDllState
|
|||||||
static XcbXorgDllState xcbXorg;
|
static XcbXorgDllState xcbXorg;
|
||||||
|
|
||||||
// Salmanoff hooks, obtained from SMO_GET_SENSE_API_DESC_FN_NAME().
|
// Salmanoff hooks, obtained from SMO_GET_SENSE_API_DESC_FN_NAME().
|
||||||
static const smo::sense_api::SalmanoffCallbacks* smoHooksPtr = nullptr;
|
static const smo::sense_api::SmoCallbacks* smoHooksPtr = nullptr;
|
||||||
static smo::sense_api::SmoThreadingModelDesc smoThreadingModelDesc;
|
static smo::sense_api::SmoThreadingModelDesc smoThreadingModelDesc;
|
||||||
|
|
||||||
// Attached windows.
|
// Attached windows.
|
||||||
@@ -349,7 +349,7 @@ extern "C" smo::sense_api::SMO_GET_SENSE_API_DESC_FN_TYPEDEF
|
|||||||
SMO_GET_SENSE_API_DESC_FN_NAME;
|
SMO_GET_SENSE_API_DESC_FN_NAME;
|
||||||
|
|
||||||
const smo::sense_api::SenseApiDesc& SMO_GET_SENSE_API_DESC_FN_NAME(
|
const smo::sense_api::SenseApiDesc& SMO_GET_SENSE_API_DESC_FN_NAME(
|
||||||
const smo::sense_api::SalmanoffCallbacks& callbacks,
|
const smo::sense_api::SmoCallbacks& callbacks,
|
||||||
const smo::sense_api::SmoThreadingModelDesc& threadingModel)
|
const smo::sense_api::SmoThreadingModelDesc& threadingModel)
|
||||||
{
|
{
|
||||||
smoHooksPtr = &callbacks;
|
smoHooksPtr = &callbacks;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ static std::optional<std::string> searchForLibInSmoSearchPaths(
|
|||||||
/* Hooks to be provided to senseApiLibs, enabling them to call into Salmanoff
|
/* Hooks to be provided to senseApiLibs, enabling them to call into Salmanoff
|
||||||
* code.
|
* code.
|
||||||
*/
|
*/
|
||||||
static SalmanoffCallbacks salmanoffCallbacks =
|
static SmoCallbacks smoCallbacks =
|
||||||
{
|
{
|
||||||
.searchForLibInSmoSearchPaths = searchForLibInSmoSearchPaths
|
.searchForLibInSmoSearchPaths = searchForLibInSmoSearchPaths
|
||||||
};
|
};
|
||||||
@@ -135,7 +135,7 @@ SenseApiLib& SenseApiManager::loadSenseApiLib(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const SenseApiDesc &libApiDesc = func(
|
const SenseApiDesc &libApiDesc = func(
|
||||||
salmanoffCallbacks, smoThreadingModelDesc);
|
smoCallbacks, smoThreadingModelDesc);
|
||||||
|
|
||||||
auto lib = std::make_shared<SenseApiLib>(
|
auto lib = std::make_shared<SenseApiLib>(
|
||||||
libraryPath, dlopen_handle.release(), func);
|
libraryPath, dlopen_handle.release(), func);
|
||||||
|
|||||||
Reference in New Issue
Block a user