Skip to content

Commit a2461b6

Browse files
committed
Apply pre-commit style fixes
Signed-off-by: Andrea Ricchi <andrea.ricchi@amarulasolutions.com>
1 parent be20143 commit a2461b6

15 files changed

Lines changed: 169 additions & 175 deletions

.github/workflows/code-format.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ jobs:
4949
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
5050
title: Fix the format of your nice code
5151
body: Every time you change the format, I am here to fix your mess.
52-

.github/workflows/conf-build-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,3 @@ jobs:
128128
- name: Deploy to GitHub Pages
129129
id: deployment
130130
uses: actions/deploy-pages@v4
131-

.github/workflows/lint.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@ jobs:
5151
github_token: ${{ secrets.GITHUB_TOKEN }}
5252
clang_tidy_fixes: ${{ runner.temp }}/clang-fixes.yml
5353
pull_request_id: ${{ steps.getprv.outputs.prn }}
54-
request_changes: false
55-
54+
request_changes: false

.github/workflows/recreate-develop.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ jobs:
3232
git checkout main
3333
git checkout -b develop
3434
git push origin develop
35-

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,4 @@ CMakeUserPresets.json
236236
.history
237237
.ionide
238238

239-
# End of https://www.toptal.com/developers/gitignore/api/clion+all,visualstudiocode,qtcreator,cmake,c,c++
239+
# End of https://www.toptal.com/developers/gitignore/api/clion+all,visualstudiocode,qtcreator,cmake,c,c++

CMakePresets.json

Lines changed: 116 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,134 @@
11
{
2-
"version": 6,
3-
"configurePresets": [
4-
{
5-
"name": "default-release",
6-
"displayName": "Default Release",
7-
"description": "Default configuration for release with runtime components only",
8-
"generator": "Ninja",
9-
"binaryDir": "${sourceDir}/build/${presetName}",
10-
"cacheVariables": {
11-
"CMAKE_BUILD_TYPE": "Release",
12-
"BUILD_SHARED_LIBS": "ON",
13-
"BUILD_CONNMAN": "ON",
14-
"BUILD_EXAMPLES": "ON"
15-
}
16-
},
17-
{
18-
"name": "default-develop",
19-
"displayName": "Default Config for development",
20-
"description": "Default configuration for development, release runtime and dev components, build tests ",
21-
"inherits": "default-release",
22-
"cacheVariables": {
23-
"CMAKE_BUILD_TYPE": "Debug",
24-
"BUILD_TESTS": "ON",
25-
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
26-
"BUILD_DOCS": "ON"
27-
}
28-
}
29-
],
30-
"buildPresets": [
31-
{
32-
"name": "default-release",
33-
"configurePreset": "default-release"
34-
},
35-
{
36-
"name": "default-develop",
37-
"configurePreset": "default-develop"
38-
},
39-
{
40-
"name": "default-documentation",
41-
"configurePreset": "default-develop",
42-
"targets": "doxygen_docs"
43-
}
44-
],
45-
"testPresets": [
46-
{
47-
"name": "default-develop",
48-
"configurePreset": "default-develop",
49-
"output": {
50-
"outputOnFailure": true
51-
}
52-
}
53-
],
54-
"packagePresets": [
55-
{
56-
"name": "default-develop",
57-
"configurePreset": "default-develop",
58-
"generators": [
59-
"TGZ"
60-
],
61-
"variables": {
62-
"CPACK_COMPONENTS_GROUPING": "ALL_COMPONENTS_IN_ONE",
63-
"CPACK_PACKAGE_CONTACT": "develop@amarulasolutions.com",
64-
"CPACK_PACKAGE_VENDOR": "amarulasolutions"
65-
},
66-
"packageDirectory": "packages-${presetName}"
67-
},
68-
{
69-
"name": "default-runtime-release",
70-
"configurePreset": "default-release",
71-
"inherits": "default-develop",
72-
"variables": {
73-
"CPACK_COMPONENTS_GROUPING": "ALL_COMPONENTS_IN_ONE",
74-
"CPACK_ARCHIVE_COMPONENT_INSTALL": "ON",
75-
"CPACK_COMPONENTS_ALL": "GDbusCpp",
76-
"CPACK_PACKAGE_CONTACT": "develop@amarulasolutions.com",
77-
"CPACK_PACKAGE_VENDOR": "amarulasolutions"
78-
}
79-
}
80-
],
81-
"workflowPresets": [
82-
{
83-
"name": "default-develop",
84-
"steps": [
2+
"version": 6,
3+
"configurePresets": [
854
{
86-
"type": "configure",
87-
"name": "default-develop"
5+
"name": "default-release",
6+
"displayName": "Default Release",
7+
"description": "Default configuration for release with runtime components only",
8+
"generator": "Ninja",
9+
"binaryDir": "${sourceDir}/build/${presetName}",
10+
"cacheVariables": {
11+
"CMAKE_BUILD_TYPE": "Release",
12+
"BUILD_SHARED_LIBS": "ON",
13+
"BUILD_CONNMAN": "ON",
14+
"BUILD_EXAMPLES": "ON"
15+
}
8816
},
8917
{
90-
"type": "build",
91-
"name": "default-develop"
18+
"name": "default-develop",
19+
"displayName": "Default Config for development",
20+
"description": "Default configuration for development, release runtime and dev components, build tests ",
21+
"inherits": "default-release",
22+
"cacheVariables": {
23+
"CMAKE_BUILD_TYPE": "Debug",
24+
"BUILD_TESTS": "ON",
25+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
26+
"BUILD_DOCS": "ON"
27+
}
28+
}
29+
],
30+
"buildPresets": [
31+
{
32+
"name": "default-release",
33+
"configurePreset": "default-release"
9234
},
9335
{
94-
"type": "test",
95-
"name": "default-develop"
36+
"name": "default-develop",
37+
"configurePreset": "default-develop"
9638
},
9739
{
98-
"type": "package",
99-
"name": "default-develop"
40+
"name": "default-documentation",
41+
"configurePreset": "default-develop",
42+
"targets": "doxygen_docs"
10043
}
101-
]
102-
},
103-
{
104-
"name": "default-release",
105-
"steps": [
44+
],
45+
"testPresets": [
10646
{
107-
"type": "configure",
108-
"name": "default-release"
109-
},
47+
"name": "default-develop",
48+
"configurePreset": "default-develop",
49+
"output": {
50+
"outputOnFailure": true
51+
}
52+
}
53+
],
54+
"packagePresets": [
11055
{
111-
"type": "build",
112-
"name": "default-release"
56+
"name": "default-develop",
57+
"configurePreset": "default-develop",
58+
"generators": [
59+
"TGZ"
60+
],
61+
"variables": {
62+
"CPACK_COMPONENTS_GROUPING": "ALL_COMPONENTS_IN_ONE",
63+
"CPACK_PACKAGE_CONTACT": "develop@amarulasolutions.com",
64+
"CPACK_PACKAGE_VENDOR": "amarulasolutions"
65+
},
66+
"packageDirectory": "packages-${presetName}"
11367
},
11468
{
115-
"type": "package",
116-
"name": "default-runtime-release"
69+
"name": "default-runtime-release",
70+
"configurePreset": "default-release",
71+
"inherits": "default-develop",
72+
"variables": {
73+
"CPACK_COMPONENTS_GROUPING": "ALL_COMPONENTS_IN_ONE",
74+
"CPACK_ARCHIVE_COMPONENT_INSTALL": "ON",
75+
"CPACK_COMPONENTS_ALL": "GDbusCpp",
76+
"CPACK_PACKAGE_CONTACT": "develop@amarulasolutions.com",
77+
"CPACK_PACKAGE_VENDOR": "amarulasolutions"
78+
}
11779
}
118-
]
119-
},
120-
{
121-
"name": "default-documentation",
122-
"steps": [
80+
],
81+
"workflowPresets": [
82+
{
83+
"name": "default-develop",
84+
"steps": [
85+
{
86+
"type": "configure",
87+
"name": "default-develop"
88+
},
89+
{
90+
"type": "build",
91+
"name": "default-develop"
92+
},
93+
{
94+
"type": "test",
95+
"name": "default-develop"
96+
},
97+
{
98+
"type": "package",
99+
"name": "default-develop"
100+
}
101+
]
102+
},
123103
{
124-
"type": "configure",
125-
"name": "default-develop"
104+
"name": "default-release",
105+
"steps": [
106+
{
107+
"type": "configure",
108+
"name": "default-release"
109+
},
110+
{
111+
"type": "build",
112+
"name": "default-release"
113+
},
114+
{
115+
"type": "package",
116+
"name": "default-runtime-release"
117+
}
118+
]
126119
},
127120
{
128-
"type": "build",
129-
"name": "default-documentation"
121+
"name": "default-documentation",
122+
"steps": [
123+
{
124+
"type": "configure",
125+
"name": "default-develop"
126+
},
127+
{
128+
"type": "build",
129+
"name": "default-documentation"
130+
}
131+
]
130132
}
131-
]
132-
}
133-
]
134-
}
133+
]
134+
}

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# gdbus-cpp
1+
# gdbus-cpp
22

33
[TOC]
44

5-
This repository should provide easy to use C++ API to communicate with the DBus using GDBus.
5+
This repository should provide easy to use C++ API to communicate with the DBus using GDBus.
66

77
## Configure, build, test, package ...
88

@@ -15,9 +15,9 @@ Refer to [cmake](https://cmake.org/cmake/help/latest/manual/cmake.1.html), [ctes
1515
```CMake
1616
include(FetchContent)
1717
FetchContent_Declare(
18-
GDbusCpp
19-
GIT_REPOSITORY https://github.com/amarula/libcppconnman.git
20-
GIT_TAG vMAJOR.MINOR.PATCH
18+
GDbusCpp
19+
GIT_REPOSITORY https://github.com/amarula/libcppconnman.git
20+
GIT_TAG vMAJOR.MINOR.PATCH
2121
FIND_PACKAGE_ARGS MAJOR.MINOR CONFIG
2222
)
2323
FetchContent_MakeAvailable(GDbusCpp)
@@ -31,4 +31,3 @@ You can read the [API reference](https://amarula.github.io/libcppconnman/), or g
3131
```
3232
cmake --workflow --preset default-documentation
3333
```
34-

cmake/VersionFromGit.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,3 @@ function( version_from_git )
165165
set( VERSION_PATCH ${version_patch} PARENT_SCOPE )
166166

167167
endfunction( version_from_git )
168-
169-

examples/connmanctl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,4 +286,4 @@ auto main() -> int {
286286
}
287287
std::cout << "Exiting.\n";
288288
return 0;
289-
}
289+
}

include/amarula/dbus/connman/gagent.hpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ namespace Amarula::DBus::G::Connman {
99
class Connman;
1010

1111
class Agent {
12-
GDBusNodeInfo *node_info_;
12+
GDBusNodeInfo* node_info_;
1313
guint registration_id_{0};
14-
GDBusConnection *connection_{nullptr};
14+
GDBusConnection* connection_{nullptr};
1515
static constexpr const auto AGENT_PATH{"/net/amarula/gconnman/agent"};
1616

17-
explicit Agent(GDBusConnection *connection);
17+
explicit Agent(GDBusConnection* connection);
1818

1919
using RequestInputCallback =
20-
std::function<GVariant *(const gchar *service, GVariant *fields)>;
20+
std::function<GVariant*(const gchar* service, GVariant* fields)>;
2121
using CancelCallback = std::function<void()>;
2222
using ReleaseCallback = std::function<void()>;
2323
using ReportErrorCallback =
24-
std::function<void(const gchar *service, const gchar *error)>;
24+
std::function<void(const gchar* service, const gchar* error)>;
2525

2626
void set_request_input_handler(RequestInputCallback callback) {
2727
request_input_cb_ = std::move(callback);
@@ -39,24 +39,24 @@ class Agent {
3939
CancelCallback cancel_cb_;
4040
ReleaseCallback release_cb_;
4141

42-
static void on_method_call(GDBusConnection *connection, const gchar *sender,
43-
const gchar *object_path,
44-
const gchar *interface_name,
45-
const gchar *method_name, GVariant *parameters,
46-
GDBusMethodInvocation *invocation,
42+
static void on_method_call(GDBusConnection* connection, const gchar* sender,
43+
const gchar* object_path,
44+
const gchar* interface_name,
45+
const gchar* method_name, GVariant* parameters,
46+
GDBusMethodInvocation* invocation,
4747
gpointer user_data);
4848

49-
void dispatch_method_call(GDBusMethodInvocation *invocation,
50-
const gchar *method_name, GVariant *parameters);
49+
void dispatch_method_call(GDBusMethodInvocation* invocation,
50+
const gchar* method_name, GVariant* parameters);
5151

5252
constexpr static const GDBusInterfaceVTable INTERFACE_VTABLE{
5353
Agent::on_method_call, nullptr, nullptr, {nullptr}};
5454

5555
public:
56-
Agent(const Agent &) = delete;
57-
auto operator=(const Agent &) -> Agent & = delete;
58-
Agent(Agent &&) = delete;
59-
auto operator=(Agent &&) -> Agent & = delete;
56+
Agent(const Agent&) = delete;
57+
auto operator=(const Agent&) -> Agent& = delete;
58+
Agent(Agent&&) = delete;
59+
auto operator=(Agent&&) -> Agent& = delete;
6060
~Agent();
6161
friend class Manager;
6262
};

0 commit comments

Comments
 (0)