You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status);
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status);
98
-
if (err != nullptr) {
99
-
*err = status;
100
-
}
87
+
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in invoking lifecycle.ready: %d", status);
status = transport->Invoke("lifecycle.finished", jsonParameters, jsonResult);
126
-
if (status == Firebolt::Error::None) {
127
-
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Lifecycle.finished is successfully invoked");
128
-
129
-
}
130
-
131
-
} else {
132
-
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status);
Firebolt::Error status = Firebolt::Error::NotConnected;
32
32
bool success = false;
33
-
FireboltSDK::Transport<WPEFramework::Core::JSON::IElement>* transport = FireboltSDK::Accessor::Instance().GetTransport();
34
-
if (transport != nullptr) {
35
-
36
-
JsonObject jsonParameters;
37
-
38
-
WPEFramework::Core::JSON::Boolean jsonResult;
39
-
status = transport->Invoke("${info.title.lowercase}.ready", jsonParameters, jsonResult);
40
-
if (status == Firebolt::Error::None) {
41
-
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Metrics.ready is successfully invoked");
42
-
success = jsonResult.Value();
43
-
}
44
-
45
-
} else {
46
-
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status);
33
+
34
+
JsonObject jsonParameters;
35
+
WPEFramework::Core::JSON::Boolean jsonResult;
36
+
status = FireboltSDK::Gateway::Instance().Request("${info.title.lowercase}.ready", jsonParameters, jsonResult);
37
+
if (status == Firebolt::Error::None) {
38
+
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Metrics.ready is successfully invoked");
39
+
success = jsonResult.Value();
47
40
}
41
+
48
42
if (err != nullptr) {
49
43
*err = status;
50
44
}
51
45
52
46
return success;
53
47
}
54
48
55
-
56
-
/* signIn - Log a sign In event, called by Discovery.signIn(). */
Firebolt::Error status = Firebolt::Error::NotConnected;
60
53
bool success = false;
61
-
FireboltSDK::Transport<WPEFramework::Core::JSON::IElement>* transport = FireboltSDK::Accessor::Instance().GetTransport();
62
-
if (transport != nullptr) {
63
-
64
-
JsonObject jsonParameters;
65
-
66
-
WPEFramework::Core::JSON::Boolean jsonResult;
67
-
status = transport->Invoke("${info.title.lowercase}.signIn", jsonParameters, jsonResult);
68
-
if (status == Firebolt::Error::None) {
69
-
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Metrics.signOut is successfully invoked");
70
-
success = jsonResult.Value();
71
-
}
72
-
73
-
} else {
74
-
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status);
54
+
55
+
JsonObject jsonParameters;
56
+
WPEFramework::Core::JSON::Boolean jsonResult;
57
+
status = FireboltSDK::Gateway::Instance().Request("${info.title.lowercase}.signIn", jsonParameters, jsonResult);
58
+
if (status == Firebolt::Error::None) {
59
+
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Metrics.signOut is successfully invoked");
60
+
success = jsonResult.Value();
75
61
}
62
+
76
63
if (err != nullptr) {
77
64
*err = status;
78
65
}
79
66
return success;
80
67
81
-
}
68
+
}
69
+
82
70
/* signOut - Log a sign out event, called by Discovery.signOut(). */
Firebolt::Error status = Firebolt::Error::NotConnected;
86
74
bool success = false;
87
-
FireboltSDK::Transport<WPEFramework::Core::JSON::IElement>* transport = FireboltSDK::Accessor::Instance().GetTransport();
88
-
if (transport != nullptr) {
89
-
90
-
JsonObject jsonParameters;
91
-
92
-
WPEFramework::Core::JSON::Boolean jsonResult;
93
-
status = transport->Invoke("${info.title.lowercase}.signOut", jsonParameters, jsonResult);
94
-
if (status == Firebolt::Error::None) {
95
-
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Metrics.signOut is successfully invoked");
96
-
success = jsonResult.Value();
97
-
}
98
-
99
-
} else {
100
-
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status);
75
+
76
+
JsonObject jsonParameters;
77
+
WPEFramework::Core::JSON::Boolean jsonResult;
78
+
status = FireboltSDK::Gateway::Instance().Request("${info.title.lowercase}.signOut", jsonParameters, jsonResult);
79
+
if (status == Firebolt::Error::None) {
80
+
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Metrics.signOut is successfully invoked");
0 commit comments