Skip to content

Commit e0710be

Browse files
RDKEMW-2861 : follow coding guidelines (#285)
Reason for change: following coding guidelines Test Procedure: None Risks: None Signed-off-by: Nikita Poltorapavlo <[email protected]> Co-authored-by: Anand Kandasamy <[email protected]>
1 parent ec0b201 commit e0710be

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

apis/PersistentStore/IStore.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ struct EXTERNAL IStore : virtual public Core::IUnknown {
3030
struct EXTERNAL INotification : virtual public Core::IUnknown {
3131
enum { ID = ID_STORE_NOTIFICATION };
3232

33-
virtual void ValueChanged(const string &ns, const string &key, const string &value) = 0;
34-
virtual void StorageExceeded() = 0;
33+
virtual void ValueChanged(const string &ns, const string &key, const string &value) {}
34+
virtual void StorageExceeded() {}
3535
};
3636

37-
virtual uint32_t Register(Exchange::IStore::INotification *notification) = 0;
38-
virtual uint32_t Unregister(Exchange::IStore::INotification *notification) = 0;
39-
virtual uint32_t SetValue(const string &ns, const string &key, const string &value) = 0;
40-
virtual uint32_t GetValue(const string &ns, const string &key, string &value /* @out */) = 0;
41-
virtual uint32_t DeleteKey(const string &ns, const string &key) = 0;
42-
virtual uint32_t DeleteNamespace(const string &ns) = 0;
37+
virtual Core::hresult Register(Exchange::IStore::INotification *notification) = 0;
38+
virtual Core::hresult Unregister(Exchange::IStore::INotification *notification) = 0;
39+
virtual Core::hresult SetValue(const string &ns, const string &key, const string &value) = 0;
40+
virtual Core::hresult GetValue(const string &ns, const string &key, string &value /* @out */) = 0;
41+
virtual Core::hresult DeleteKey(const string &ns, const string &key) = 0;
42+
virtual Core::hresult DeleteNamespace(const string &ns) = 0;
4343
};
4444

4545
} // namespace Exchange

apis/PersistentStore/IStore2.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@ namespace Exchange {
4444
~INotification() override = default;
4545

4646
// @alt onValueChanged
47-
virtual void ValueChanged(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, const string& value) = 0;
47+
virtual void ValueChanged(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, const string& value) {}
4848
};
4949

50-
virtual uint32_t Register(Exchange::IStore2::INotification* notification) = 0;
51-
virtual uint32_t Unregister(Exchange::IStore2::INotification* notification) = 0;
50+
virtual Core::hresult Register(Exchange::IStore2::INotification* notification) = 0;
51+
virtual Core::hresult Unregister(Exchange::IStore2::INotification* notification) = 0;
5252

5353
// @alt setValue
54-
virtual uint32_t SetValue(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, const string& value, const uint32_t ttl) = 0;
54+
virtual Core::hresult SetValue(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, const string& value, const uint32_t ttl) = 0;
5555
// @alt getValue
56-
virtual uint32_t GetValue(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, string& value /* @out */, uint32_t& ttl /* @out */) = 0;
56+
virtual Core::hresult GetValue(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, string& value /* @out */, uint32_t& ttl /* @out */) = 0;
5757
// @alt deleteKey
58-
virtual uint32_t DeleteKey(const ScopeType scope, const string& ns /* @text:namespace */, const string& key) = 0;
58+
virtual Core::hresult DeleteKey(const ScopeType scope, const string& ns /* @text:namespace */, const string& key) = 0;
5959
// @alt deleteNamespace
60-
virtual uint32_t DeleteNamespace(const ScopeType scope, const string& ns /* @text:namespace */) = 0;
60+
virtual Core::hresult DeleteNamespace(const ScopeType scope, const string& ns /* @text:namespace */) = 0;
6161
};
6262

6363
struct EXTERNAL IStoreInspector : virtual public Core::IUnknown {
@@ -74,9 +74,9 @@ namespace Exchange {
7474
using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;
7575
using INamespaceSizeIterator = RPC::IIteratorType<NamespaceSize, ID_STORE_INSPECTOR_NAMESPACE_SIZE_ITERATOR>;
7676

77-
virtual uint32_t GetKeys(const ScopeType scope, const string& ns, IStringIterator*& keys /* @out */) = 0;
78-
virtual uint32_t GetNamespaces(const ScopeType scope, IStringIterator*& namespaces /* @out */) = 0;
79-
virtual uint32_t GetStorageSizes(const ScopeType scope, INamespaceSizeIterator*& storageList /* @out */) = 0;
77+
virtual Core::hresult GetKeys(const ScopeType scope, const string& ns, IStringIterator*& keys /* @out */) = 0;
78+
virtual Core::hresult GetNamespaces(const ScopeType scope, IStringIterator*& namespaces /* @out */) = 0;
79+
virtual Core::hresult GetStorageSizes(const ScopeType scope, INamespaceSizeIterator*& storageList /* @out */) = 0;
8080
};
8181

8282
struct EXTERNAL IStoreLimit : virtual public Core::IUnknown {
@@ -86,8 +86,8 @@ namespace Exchange {
8686

8787
using ScopeType = IStore2::ScopeType;
8888

89-
virtual uint32_t SetNamespaceStorageLimit(const ScopeType scope, const string& ns, const uint32_t size) = 0;
90-
virtual uint32_t GetNamespaceStorageLimit(const ScopeType scope, const string& ns, uint32_t& size /* @out */) = 0;
89+
virtual Core::hresult SetNamespaceStorageLimit(const ScopeType scope, const string& ns, const uint32_t size) = 0;
90+
virtual Core::hresult GetNamespaceStorageLimit(const ScopeType scope, const string& ns, uint32_t& size /* @out */) = 0;
9191
};
9292

9393
} // namespace Exchange

apis/PersistentStore/IStoreCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Exchange {
2727
struct EXTERNAL IStoreCache : virtual public Core::IUnknown {
2828
enum { ID = ID_STORE_CACHE };
2929

30-
virtual uint32_t FlushCache() = 0;
30+
virtual Core::hresult FlushCache() = 0;
3131
};
3232

3333
} // namespace Exchange

0 commit comments

Comments
 (0)