mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 00:51:35 +00:00
commit
319d3635ad
@ -35,20 +35,11 @@ namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
void MakeThingsPart01(MessageParcel& parcel)
|
||||
{
|
||||
if (data == nullptr || size < DATA_MIN_SIZE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MessageParcel parcel;
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
|
||||
parcel.WriteInterfaceToken(SceneSessionManagerStub::GetDescriptor());
|
||||
parcel.WriteBuffer(data, size);
|
||||
parcel.RewindRead(0);
|
||||
|
||||
SceneSessionManager::GetInstance().OnRemoteRequest(
|
||||
static_cast<uint32_t>(ISceneSessionManager::
|
||||
SceneSessionManagerMessage::TRANS_ID_SET_SESSION_LABEL),
|
||||
@ -61,6 +52,10 @@ bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
static_cast<uint32_t>(ISceneSessionManager::
|
||||
SceneSessionManagerMessage::TRANS_ID_SET_SESSION_ICON),
|
||||
parcel, reply, option);
|
||||
SceneSessionManager::GetInstance().OnRemoteRequest(
|
||||
static_cast<uint32_t>(ISceneSessionManager::
|
||||
SceneSessionManagerMessage::TRANS_ID_GET_SESSION_SNAPSHOT_BY_ID),
|
||||
parcel, reply, option);
|
||||
SceneSessionManager::GetInstance().OnRemoteRequest(
|
||||
static_cast<uint32_t>(ISceneSessionManager::
|
||||
SceneSessionManagerMessage::TRANS_ID_SET_GESTURE_NAVIGATION_ENABLED),
|
||||
@ -69,6 +64,13 @@ bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
static_cast<uint32_t>(ISceneSessionManager::
|
||||
SceneSessionManagerMessage::TRANS_ID_UPDATE_AVOIDAREA_LISTENER),
|
||||
parcel, reply, option);
|
||||
}
|
||||
|
||||
void MakeThingsPart02(MessageParcel& parcel)
|
||||
{
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
|
||||
SceneSessionManager::GetInstance().OnRemoteRequest(
|
||||
static_cast<uint32_t>(ISceneSessionManager::
|
||||
SceneSessionManagerMessage::TRANS_ID_SET_SESSION_CONTINUE_STATE),
|
||||
@ -85,6 +87,21 @@ bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
static_cast<uint32_t>(ISceneSessionManager::
|
||||
SceneSessionManagerMessage::TRANS_ID_UPDATE_EXTENSION_WINDOW_FLAGS),
|
||||
parcel, reply, option);
|
||||
}
|
||||
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
if (data == nullptr || size < DATA_MIN_SIZE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MessageParcel parcel;
|
||||
parcel.WriteInterfaceToken(SceneSessionManagerStub::GetDescriptor());
|
||||
parcel.WriteBuffer(data, size);
|
||||
parcel.RewindRead(0);
|
||||
|
||||
MakeThingsPart01(parcel);
|
||||
MakeThingsPart02(parcel);
|
||||
return true;
|
||||
}
|
||||
} // namespace OHOS
|
||||
|
Loading…
Reference in New Issue
Block a user