-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Json meta to IDL changes: for location sync
- Loading branch information
1 parent
14beba4
commit 57ac026
Showing
2 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* If not stated otherwise in this file or this component's LICENSE file the | ||
* following copyright and licenses apply: | ||
* | ||
* Copyright 2024 Metrological | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "Module.h" | ||
|
||
namespace Thunder { | ||
namespace Exchange { | ||
/* @json 1.0.0 */ | ||
struct EXTERNAL IDeviceIdentification : virtual public Core::IUnknown { | ||
enum { ID = ID_DEVICEIDENTIFICATION }; | ||
|
||
struct Info { | ||
string firmwareversion /* @brief Version of the device firmware */; | ||
string chipset /* @brief Chipset used for this device */; | ||
string deviceid /* @brief Device ID */; | ||
}; | ||
|
||
// @property | ||
// @brief Get device identification information | ||
virtual Core::hresult DeviceIdMetaData(Info& value /* @out */) const = 0; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* If not stated otherwise in this file or this component's LICENSE file the | ||
* following copyright and licenses apply: | ||
* | ||
* Copyright 2024 Metrological | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "Module.h" | ||
|
||
namespace Thunder { | ||
namespace Exchange { | ||
/* @json 1.0.0 */ | ||
struct EXTERNAL ILocationSync : virtual public Core::IUnknown { | ||
enum { ID = ID_LOCATIONSYNC }; | ||
|
||
struct Info { | ||
string city /* @brief City name */; | ||
string country /* @brief Country name */; | ||
string region /* @brief Region name */; | ||
string timezone /* @brief Time zone information */; | ||
string publicip /* @brief Public IP */; | ||
}; | ||
|
||
// @event | ||
struct EXTERNAL INotification : virtual public Core::IUnknown { | ||
enum { ID = ID_LOCATIONSYNC_NOTIFICATION }; | ||
// @brief Signals a location change | ||
virtual void LocationChange() = 0; | ||
}; | ||
// Pushing notifications to interested sinks | ||
virtual Core::hresult Register(INotification* notification) = 0; | ||
virtual Core::hresult Unregister(INotification* notification) = 0; | ||
|
||
// @property | ||
// @brief Get location information | ||
virtual Core::hresult Location(Info& value /* @out */) const = 0; | ||
|
||
// @brief Runs sync command | ||
virtual Core::hresult Sync() = 0; | ||
}; | ||
} | ||
} |