@@ -125,7 +125,7 @@ int main()
125
125
);
126
126
127
127
// you can now call list names:
128
- auto services = dbusInterface. ListNames();
128
+ auto services = dbusInterface-> ListNames();
129
129
130
130
// print all to console, which aren't stupidly named / numbered, therefore unnamed
131
131
for (auto const& service : services)
@@ -175,7 +175,7 @@ int main()
175
175
176
176
// call ListNames asynchronously with async_flag overload:
177
177
// (always the first parameter, if there are any)
178
- dbusInterface. ListNames(async_flag)
178
+ dbusInterface-> ListNames(async_flag)
179
179
// if you omit the then, you wont get a result / response.
180
180
// Which can be fine, but is usually not intended
181
181
.then([](auto const& services)
@@ -474,7 +474,7 @@ int main()
474
474
//user_control.CreateUser("hello", "hello", 0);
475
475
476
476
// calling a method and getting the result
477
- auto cachedUsers = user_control. ListCachedUsers();
477
+ auto cachedUsers = user_control-> ListCachedUsers();
478
478
479
479
for (auto const& user : cachedUsers)
480
480
{
@@ -483,7 +483,7 @@ int main()
483
483
}
484
484
485
485
// reading a property
486
- std::cout << user_control. DaemonVersion << "\n";
486
+ std::cout << user_control-> DaemonVersion << "\n";
487
487
}
488
488
catch (std::exception const& exc) // catch all possible exceptions.
489
489
{
@@ -559,7 +559,7 @@ int main()
559
559
"org.freedesktop.Accounts"
560
560
);
561
561
562
- accountControl. UserAdded.listen(
562
+ accountControl-> UserAdded.listen(
563
563
[](object_path const& p) {
564
564
// success callback
565
565
std::cout << "callback - create: " << p << std::endl;
@@ -572,13 +572,13 @@ int main()
572
572
573
573
// WARNING! Passing "release_slot" forces you to manage the slots lifetime yourself!
574
574
// 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(
576
576
[&](object_path const& p) {
577
577
// this is called from the dbus system.
578
578
std::cout << "callback - delete: " << p << std::endl;
579
579
580
580
// create a user from here.
581
- auto path = accountControl. CreateUser("tempus", "tempus", 0);
581
+ auto path = accountControl-> CreateUser("tempus", "tempus", 0);
582
582
},
583
583
[](message&, std::string const& str) {
584
584
// this is called when an error got signaled into our callback.
@@ -591,10 +591,10 @@ int main()
591
591
try {
592
592
// commented out in case you just run this example
593
593
// you should get the id from the name first.
594
- //accountControl. DeleteUser(1001, false);
594
+ //accountControl-> DeleteUser(1001, false);
595
595
} catch (std::exception const& exc) {
596
596
// Create the user if he doesn't exist
597
- accountControl. CreateUser("tempus", "tempus", 0);
597
+ accountControl-> CreateUser("tempus", "tempus", 0);
598
598
std::cout << exc.what() << std::endl;
599
599
}
600
600
0 commit comments