Skip to content

Commit

Permalink
Json meta to IDL changes: for location sync
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul committed Dec 3, 2024
1 parent 14beba4 commit 57ac026
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
41 changes: 41 additions & 0 deletions interfaces/IDeviceIdentification.h
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;
};
}
}
56 changes: 56 additions & 0 deletions interfaces/ILocationSync.h
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;
};
}
}

0 comments on commit 57ac026

Please sign in to comment.