Skip to content

Commit 1fd37f4

Browse files
committed
Updated README.
1 parent 7f27e79 commit 1fd37f4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int main()
125125
);
126126

127127
// you can now call list names:
128-
auto services = dbusInterface.ListNames();
128+
auto services = dbusInterface->ListNames();
129129

130130
// print all to console, which aren't stupidly named / numbered, therefore unnamed
131131
for (auto const& service : services)
@@ -175,7 +175,7 @@ int main()
175175

176176
// call ListNames asynchronously with async_flag overload:
177177
// (always the first parameter, if there are any)
178-
dbusInterface.ListNames(async_flag)
178+
dbusInterface->ListNames(async_flag)
179179
// if you omit the then, you wont get a result / response.
180180
// Which can be fine, but is usually not intended
181181
.then([](auto const& services)
@@ -474,7 +474,7 @@ int main()
474474
//user_control.CreateUser("hello", "hello", 0);
475475

476476
// calling a method and getting the result
477-
auto cachedUsers = user_control.ListCachedUsers();
477+
auto cachedUsers = user_control->ListCachedUsers();
478478

479479
for (auto const& user : cachedUsers)
480480
{
@@ -483,7 +483,7 @@ int main()
483483
}
484484

485485
// reading a property
486-
std::cout << user_control.DaemonVersion << "\n";
486+
std::cout << user_control->DaemonVersion << "\n";
487487
}
488488
catch (std::exception const& exc) // catch all possible exceptions.
489489
{
@@ -559,7 +559,7 @@ int main()
559559
"org.freedesktop.Accounts"
560560
);
561561

562-
accountControl.UserAdded.listen(
562+
accountControl->UserAdded.listen(
563563
[](object_path const& p) {
564564
// success callback
565565
std::cout << "callback - create: " << p << std::endl;
@@ -572,13 +572,13 @@ int main()
572572

573573
// WARNING! Passing "release_slot" forces you to manage the slots lifetime yourself!
574574
// You can use this variation to manage lifetimes of your observed signals.
575-
std::unique_ptr<void, void(*)(void*)> slot = accountControl.UserDeleted.listen(
575+
std::unique_ptr<void, void(*)(void*)> slot = accountControl->UserDeleted.listen(
576576
[&](object_path const& p) {
577577
// this is called from the dbus system.
578578
std::cout << "callback - delete: " << p << std::endl;
579579

580580
// create a user from here.
581-
auto path = accountControl.CreateUser("tempus", "tempus", 0);
581+
auto path = accountControl->CreateUser("tempus", "tempus", 0);
582582
},
583583
[](message&, std::string const& str) {
584584
// this is called when an error got signaled into our callback.
@@ -591,10 +591,10 @@ int main()
591591
try {
592592
// commented out in case you just run this example
593593
// you should get the id from the name first.
594-
//accountControl.DeleteUser(1001, false);
594+
//accountControl->DeleteUser(1001, false);
595595
} catch (std::exception const& exc) {
596596
// Create the user if he doesn't exist
597-
accountControl.CreateUser("tempus", "tempus", 0);
597+
accountControl->CreateUser("tempus", "tempus", 0);
598598
std::cout << exc.what() << std::endl;
599599
}
600600

0 commit comments

Comments
 (0)