-
-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run clang-format over whole codebase
- Loading branch information
Showing
144 changed files
with
2,883 additions
and
3,560 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
Language: Cpp | ||
# BasedOnStyle: LLVM | ||
AccessModifierOffset: -2 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlines: Right | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BraceWrapping: | ||
AfterClass: false | ||
AfterControlStatement: false | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
AfterExternBlock: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
SplitEmptyFunction: true | ||
SplitEmptyRecord: true | ||
SplitEmptyNamespace: true | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Attach | ||
BreakBeforeInheritanceComma: false | ||
BreakInheritanceList: BeforeColon | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakConstructorInitializers: BeforeColon | ||
BreakAfterJavaFieldAnnotations: false | ||
BreakStringLiterals: true | ||
ColumnLimit: 160 | ||
CommentPragmas: '^ IWYU pragma:' | ||
CompactNamespaces: false | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
ForEachMacros: | ||
- foreach | ||
- Q_FOREACH | ||
- BOOST_FOREACH | ||
IncludeBlocks: Preserve | ||
IncludeCategories: | ||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/' | ||
Priority: 2 | ||
- Regex: '^(<|"(gtest|gmock|isl|json)/)' | ||
Priority: 3 | ||
- Regex: '.*' | ||
Priority: 1 | ||
IncludeIsMainRegex: '(Test)?$' | ||
IndentCaseLabels: false | ||
IndentPPDirectives: None | ||
IndentWidth: 2 | ||
IndentWrappedFunctionNames: false | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: All | ||
ObjCBinPackProtocolList: Auto | ||
ObjCBlockIndentWidth: 2 | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakAssignment: 2 | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyBreakTemplateDeclaration: 10 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 60 | ||
PointerAlignment: Right | ||
ReflowComments: true | ||
SortIncludes: true | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCpp11BracedList: false | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: Cpp11 | ||
TabWidth: 2 | ||
UseTab: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,101 @@ | ||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/gen) | ||
|
||
add_custom_command( | ||
OUTPUT ${CMAKE_BINARY_DIR}/gen/abstractstubserver.h | ||
COMMAND jsonrpcstub ARGS ${CMAKE_CURRENT_SOURCE_DIR}/spec.json --cpp-server=AbstractStubServer --cpp-server-file=${CMAKE_BINARY_DIR}/gen/abstractstubserver.h | ||
MAIN_DEPENDENCY spec.json | ||
DEPENDS jsonrpcstub | ||
COMMENT "Generating Server Stubfiles" | ||
VERBATIM | ||
OUTPUT ${CMAKE_BINARY_DIR}/gen/abstractstubserver.h | ||
COMMAND jsonrpcstub ARGS ${CMAKE_CURRENT_SOURCE_DIR}/spec.json --cpp-server=AbstractStubServer --cpp-server-file=${CMAKE_BINARY_DIR}/gen/abstractstubserver.h | ||
MAIN_DEPENDENCY spec.json | ||
DEPENDS jsonrpcstub | ||
COMMENT "Generating Server Stubfiles" | ||
VERBATIM | ||
) | ||
|
||
add_custom_command( | ||
OUTPUT ${CMAKE_BINARY_DIR}/gen/stubclient.h | ||
COMMAND jsonrpcstub ARGS ${CMAKE_CURRENT_SOURCE_DIR}/spec.json --cpp-client=StubClient --cpp-client-file=${CMAKE_BINARY_DIR}/gen/stubclient.h | ||
MAIN_DEPENDENCY spec.json | ||
DEPENDS jsonrpcstub | ||
COMMENT "Generating Client Stubfile" | ||
VERBATIM | ||
OUTPUT ${CMAKE_BINARY_DIR}/gen/stubclient.h | ||
COMMAND jsonrpcstub ARGS ${CMAKE_CURRENT_SOURCE_DIR}/spec.json --cpp-client=StubClient --cpp-client-file=${CMAKE_BINARY_DIR}/gen/stubclient.h | ||
MAIN_DEPENDENCY spec.json | ||
DEPENDS jsonrpcstub | ||
COMMENT "Generating Client Stubfile" | ||
VERBATIM | ||
) | ||
|
||
add_custom_target(common_stubs | ||
DEPENDS ${CMAKE_BINARY_DIR}/gen/abstractstubserver.h ${CMAKE_BINARY_DIR}/gen/stubclient.h | ||
) | ||
DEPENDS ${CMAKE_BINARY_DIR}/gen/abstractstubserver.h ${CMAKE_BINARY_DIR}/gen/stubclient.h | ||
) | ||
|
||
add_custom_command( | ||
OUTPUT ${CMAKE_BINARY_DIR}/gen/xbmcremote.h | ||
COMMAND jsonrpcstub ARGS ${CMAKE_CURRENT_SOURCE_DIR}/xbmc_remote.json --cpp-client=XbmcRemoteClient --cpp-client-file=${CMAKE_BINARY_DIR}/gen/xbmcremote.h | ||
MAIN_DEPENDENCY xbmc_remote.json | ||
DEPENDS jsonrpcstub | ||
COMMENT "Generating Client XBMC Stubfile" | ||
VERBATIM | ||
OUTPUT ${CMAKE_BINARY_DIR}/gen/xbmcremote.h | ||
COMMAND jsonrpcstub ARGS ${CMAKE_CURRENT_SOURCE_DIR}/xbmc_remote.json --cpp-client=XbmcRemoteClient --cpp-client-file=${CMAKE_BINARY_DIR}/gen/xbmcremote.h | ||
MAIN_DEPENDENCY xbmc_remote.json | ||
DEPENDS jsonrpcstub | ||
COMMENT "Generating Client XBMC Stubfile" | ||
VERBATIM | ||
) | ||
|
||
include_directories(..) | ||
include_directories(${CMAKE_BINARY_DIR}) | ||
include_directories(${MHD_INCLUDE_DIRS}) | ||
|
||
if(UNIX) | ||
if(UNIX_DOMAIN_SOCKET_SERVER AND UNIX_DOMAIN_SOCKET_CLIENT) | ||
if (UNIX) | ||
if (UNIX_DOMAIN_SOCKET_SERVER AND UNIX_DOMAIN_SOCKET_CLIENT) | ||
add_executable(unixdomainsocketserversample unixdomainsocketserver.cpp) | ||
target_link_libraries(unixdomainsocketserversample jsonrpcserver) | ||
add_executable(unixdomainsocketclientsample unixdomainsocketclient.cpp) | ||
target_link_libraries(unixdomainsocketclientsample jsonrpcclient) | ||
endif() | ||
endif () | ||
|
||
if(FILE_DESCRIPTOR_SERVER AND FILE_DESCRIPTOR_CLIENT) | ||
add_executable(filedescriptorserversample filedescriptorserver.cpp) | ||
target_link_libraries(filedescriptorserversample jsonrpcserver) | ||
add_executable(filedescriptorclientsample filedescriptorclient.cpp) | ||
target_link_libraries(filedescriptorclientsample jsonrpcclient) | ||
endif() | ||
endif(UNIX) | ||
if (FILE_DESCRIPTOR_SERVER AND FILE_DESCRIPTOR_CLIENT) | ||
add_executable(filedescriptorserversample filedescriptorserver.cpp) | ||
target_link_libraries(filedescriptorserversample jsonrpcserver) | ||
add_executable(filedescriptorclientsample filedescriptorclient.cpp) | ||
target_link_libraries(filedescriptorclientsample jsonrpcclient) | ||
endif () | ||
endif (UNIX) | ||
|
||
if (TCP_SOCKET_SERVER AND TCP_SOCKET_CLIENT) | ||
add_executable(tcpsocketclient tcpsocketclient.cpp) | ||
target_link_libraries(tcpsocketclient jsonrpcclient) | ||
add_executable(tcpsocketserver tcpsocketserver.cpp) | ||
target_link_libraries(tcpsocketserver jsonrpcserver) | ||
endif() | ||
endif () | ||
|
||
if (SERIAL_PORT_SERVER AND SERIAL_PORT_CLIENT) | ||
add_executable(serialportclient serialportclient.cpp) | ||
target_link_libraries(serialportclient jsonrpcclient) | ||
add_executable(serialportserver serialportserver.cpp) | ||
target_link_libraries(serialportserver jsonrpcserver) | ||
endif() | ||
endif () | ||
|
||
if(HTTP_SERVER) | ||
if (HTTP_SERVER) | ||
add_executable(simpleserversample simpleserver.cpp) | ||
target_link_libraries(simpleserversample jsonrpcserver) | ||
endif() | ||
endif () | ||
|
||
if(HTTP_CLIENT) | ||
if (HTTP_CLIENT) | ||
add_executable(simpleclientsample simpleclient.cpp) | ||
target_link_libraries(simpleclientsample jsonrpcclient) | ||
endif() | ||
endif () | ||
|
||
if(REDIS_SERVER) | ||
if (REDIS_SERVER) | ||
add_executable(redisserversample redisserver.cpp) | ||
target_link_libraries(redisserversample jsonrpcserver) | ||
endif() | ||
endif () | ||
|
||
if(REDIS_CLIENT) | ||
if (REDIS_CLIENT) | ||
add_executable(redisclientsample redisclient.cpp) | ||
target_link_libraries(redisclientsample jsonrpcclient) | ||
endif() | ||
endif () | ||
|
||
if (COMPILE_STUBGEN) | ||
if(HTTP_CLIENT) | ||
if (HTTP_CLIENT) | ||
add_executable(stubclientsample stubclient.cpp ${CMAKE_BINARY_DIR}/gen/stubclient.h) | ||
target_link_libraries(stubclientsample jsonrpcclient) | ||
add_executable(xbmcremote xbmcremote.cpp ${CMAKE_BINARY_DIR}/gen/xbmcremote.h) | ||
target_link_libraries(xbmcremote jsonrpcclient) | ||
endif() | ||
endif () | ||
|
||
if(HTTP_SERVER) | ||
if (HTTP_SERVER) | ||
add_executable(stubserversample stubserver.cpp ${CMAKE_BINARY_DIR}/gen/abstractstubserver.h) | ||
target_link_libraries(stubserversample jsonrpcserver) | ||
endif() | ||
endif() | ||
endif () | ||
endif () | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.