Skip to content

Commit b2b55be

Browse files
committed
fix: Compatibility with bidirectional changes of interactive apps in 'core' & 'manage' SDKs
1 parent 39ca20c commit b2b55be

File tree

3 files changed

+20
-33
lines changed

3 files changed

+20
-33
lines changed

src/sdks/core/src/cpp/sdk/cpptest/CoreSDKTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,11 @@ void CoreSDKTest::OnDeviceNameChangedNotification::onDeviceNameChanged(const std
431431
{
432432
cout << "Name changed, new name --> " << name << endl;
433433

434+
#ifndef INTERACTIVE_APP
434435
#ifdef GATEWAY_BIDIRECTIONAL
435436
assert(name == deviceName["payload"]);
436437
#endif
437-
438+
#endif
438439
}
439440

440441
void CoreSDKTest::SubscribeDeviceNameChanged()

src/sdks/core/src/cpp/sdk/cpptest/InteractiveApp.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ void ShowDiscoveryMenu()
145145
"\tW : Watched\n"
146146
"\tR : WatchedReduced\n"
147147
#endif
148-
"\tB : Subscribe/Unsubscribe DiscoveryOnNavigateToLaunch\n"
149148
"\tQ : Quit\n");
150149
}
151150

@@ -545,9 +544,6 @@ void HandleDiscoveryMethod()
545544
break;
546545
}
547546
#endif
548-
case 'B': {
549-
HandleEventListener(Discovery, OnNavigateToLaunchNotification)
550-
}
551547
default:
552548
break;
553549
}

src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.cpp

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -90,55 +90,45 @@ const nlohmann::json ManageSDKTest::signOutEvent = {
9090

9191
const nlohmann::json ManageSDKTest::requestStandard = {
9292
{"method", "keyboard.onRequestStandard"},
93-
{"payload", {
94-
{"parameters", {
95-
{ "message", "who has a cat?" }
96-
}}
93+
{"payload", {
94+
{ "message", "who has a cat?" }
9795
}}
9896
};
9997

10098
const nlohmann::json ManageSDKTest::requestEmail = {
10199
{"method", "keyboard.onRequestEmail"},
102100
{"payload", {
103-
{"parameters", {
104-
{ "message", "who has a cat?" }
105-
}}
101+
{ "message", "who has a cat?" }
106102
}}
107103
};
108104

109105
const nlohmann::json ManageSDKTest::requestPassword = {
110106
{"method", "keyboard.onRequestPassword"},
111-
{"payload", {
112-
{"parameters", {
113-
{ "message", "who has a cat?" }
114-
}}
107+
{"payload", {
108+
{ "message", "who has a cat?" }
115109
}}
116110
};
117111

118112
const nlohmann::json ManageSDKTest::ackRequestChallenge = {
119113
{"method", "acknowledgeChallenge.onRequestChallenge"},
120-
{"payload", {
121-
{"parameters", {
122-
{{"capability", "xrn:firebolt:capability:localization::postal-code"}},
123-
{"requestor",{
124-
{"id", "ReferenceApp"},
125-
{"name", "Firebolt Reference App"}
126-
}}
127-
}}
114+
{"payload", {
115+
{{"capability", "xrn:firebolt:capability:localization::postal-code"}},
116+
{"requestor",{
117+
{"id", "ReferenceApp"},
118+
{"name", "Firebolt Reference App"}
119+
}}
128120
}}
129121
};
130122

131123
const nlohmann::json ManageSDKTest::pinRequestChallenge = {
132124
{"method", "pinChallenge.onRequestChallenge"},
133-
{"payload", {
134-
{"parameters", {
135-
{"requestor", {
136-
{"id", "ReferenceApp"},
137-
{"name", "Firebolt Reference App"}
138-
}},
139-
{{ "pinSpace", "purchase"}},
140-
{{ "capability", "xrn:firebolt:capability:commerce::purchase"}},
141-
}}
125+
{"payload", {
126+
{"requestor", {
127+
{"id", "ReferenceApp"},
128+
{"name", "Firebolt Reference App"}
129+
}},
130+
{{ "pinSpace", "purchase"}},
131+
{{ "capability", "xrn:firebolt:capability:commerce::purchase"}},
142132
}}
143133
};
144134

0 commit comments

Comments
 (0)