diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7fb01f9 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,163 @@ +# Documentation: +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference + +# Top-most EditorConfig file +root = true + +[*] +insert_final_newline = true +end_of_line = crlf +indent_style = tab + +[*.{cs,vb}] +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true + +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_event = false:warning +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_property = false:warning + +# Use language keywords instead of framework type names for type references +dotnet_style_predefined_type_for_locals_parameters_members = true:warning +dotnet_style_predefined_type_for_member_access = true:warning + +# Suggest explicit accessibility modifiers +dotnet_style_require_accessibility_modifiers = always:suggestion + +# Suggest more modern language features when available +dotnet_style_explicit_tuple_names = true:warning +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:none +dotnet_style_prefer_conditional_expression_over_return = true:none +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion + +# Definitions +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum, delegate, type_parameter +dotnet_naming_symbols.methods_properties.applicable_kinds = method, local_function, property +dotnet_naming_symbols.public_symbols.applicable_kinds = property, method, field, event +dotnet_naming_symbols.public_symbols.applicable_accessibilities = public +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_symbols.private_protected_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_protected_internal_fields.applicable_accessibilities = private, protected, internal +dotnet_naming_symbols.parameters_locals.applicable_kinds = parameter, local +dotnet_naming_style.pascal_case_style.capitalization = pascal_case +dotnet_naming_style.camel_case_style.capitalization = camel_case + +# Name all types using PascalCase +dotnet_naming_rule.types_must_be_capitalized.symbols = types +dotnet_naming_rule.types_must_be_capitalized.style = pascal_case_style +dotnet_naming_rule.types_must_be_capitalized.severity = warning + +# Name all methods and properties using PascalCase +dotnet_naming_rule.methods_properties_must_be_capitalized.symbols = methods_properties +dotnet_naming_rule.methods_properties_must_be_capitalized.style = pascal_case_style +dotnet_naming_rule.methods_properties_must_be_capitalized.severity = warning + +# Name all public members using PascalCase +dotnet_naming_rule.public_members_must_be_capitalized.symbols = public_symbols +dotnet_naming_rule.public_members_must_be_capitalized.style = pascal_case_style +dotnet_naming_rule.public_members_must_be_capitalized.severity = warning + +# Name all constant fields using PascalCase +dotnet_naming_rule.constant_fields_must_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_must_be_pascal_case.style = pascal_case_style +dotnet_naming_rule.constant_fields_must_be_pascal_case.severity = suggestion + +# Name all private and internal fields using camelCase +dotnet_naming_rule.private_protected_internal_fields_must_be_camel_case.symbols = private_protected_internal_fields +dotnet_naming_rule.private_protected_internal_fields_must_be_camel_case.style = camel_case_style +dotnet_naming_rule.private_protected_internal_fields_must_be_camel_case.severity = warning + +# Name all parameters and locals using camelCase +dotnet_naming_rule.parameters_locals_must_be_camel_case.symbols = parameters_locals +dotnet_naming_rule.parameters_locals_must_be_camel_case.style = camel_case_style +dotnet_naming_rule.parameters_locals_must_be_camel_case.severity = warning + +# Name all private fields starting with underscore +dotnet_naming_rule.private_members_with_underscore.symbols = private_fields +dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore +dotnet_naming_rule.private_members_with_underscore.severity = suggestion + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private + +dotnet_naming_style.prefix_underscore.capitalization = camel_case +dotnet_naming_style.prefix_underscore.required_prefix = _ + +[*.cs] +csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion +csharp_style_prefer_primary_constructors = false + +# Only use "var" when it's obvious what the variable type is +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:none + +# Prefer method-like constructs to have a block body +csharp_style_expression_bodied_methods = false:none +csharp_style_expression_bodied_constructors = false:none +csharp_style_expression_bodied_operators = false:none + +# Prefer property-like constructs to have an expression-body +csharp_style_expression_bodied_properties = true:none +csharp_style_expression_bodied_indexers = true:none +csharp_style_expression_bodied_accessors = true:none + +# Suggest more modern language features when available +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion + +# Newline settings +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = one_less_than_current + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = do_not_ignore +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +[*.{xml,csproj,targets,props,json,yml}] +indent_size = 2 +indent_style = space + +[*.{json,yml}] +end_of_line = lf diff --git a/CodeMaid.config b/CodeMaid.config new file mode 100644 index 0000000..02255f6 --- /dev/null +++ b/CodeMaid.config @@ -0,0 +1,337 @@ + + + + +
+ + + + + + False + + + True + + + .*\.Designer\.cs||.*\.resx||packages.config||.*\.min\.js||.*\.min\.css + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + False + + + True + + + False + + + True + + + True + + + True + + + False + + + False + + + True + + + True + + + False + + + False + + + True + + + True + + + True + + + False + + + True + + + False + + + True + + + True + + + True + + + False + + + False + + + True + + + False + + + True + + + False + + + False + + + False + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + False + + + True + + + True + + + 0 + + + True + + + True + + + True + + + True + + + True + + + True + + + False + + + + + + + False + + + False + + + True + + + 100 + + + False + + + False + + + False + + + False + + + False + + + False + + + 0 + + + False + + + False + + + False + + + + \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..843426f --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,10 @@ + + + 12.0 + + 0024000004800000940000000602000000240000525341310004000001000100d9b40f5db1670c563c2e8be5dfd24ed66ad811b3ebba8a0ca0df9cbad3a115ca361b3de4b4d4ed990bf9874d2651e62565f56adb33af33819687021e263b02d6bf5b3cdacde4f09650cafe97467de4b9e4e9cc1d6c2d500a08759697bbe80940916c05533d172ca7e55e10434f9cc46fd189f26cefc100781a20e57f1bad65d5 + + true + $(SolutionDir)/FritzCallMonitor.snk + + diff --git a/FritzCallMonitor.sln b/FritzCallMonitor.sln new file mode 100644 index 0000000..9dbb9aa --- /dev/null +++ b/FritzCallMonitor.sln @@ -0,0 +1,76 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36414.22 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FritzCallMonitor", "src\FritzCallMonitor\FritzCallMonitor.csproj", "{9951D44E-9511-40D0-84C1-6A7344389A05}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C386CB98-2D60-4E40-B869-73053972BD28}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{DC8CE4B0-4CDD-4162-9CCD-FE711BC86EAB}" + ProjectSection(SolutionItems) = preProject + test\Directory.Build.props = test\Directory.Build.props + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FritzCallMonitor.Tests", "test\FritzCallMonitor.Tests\FritzCallMonitor.Tests.csproj", "{7C5920EA-F4A8-4446-9645-3484DB13BCBD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{3DF1F30A-77F3-4F24-8739-CB89EE07BB8B}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{6FA27A08-FCE1-405E-A4A4-3A89FF4579F3}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + .gitignore = .gitignore + CodeMaid.config = CodeMaid.config + nuget.config = nuget.config + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{B5851E79-416B-40CA-959C-ADCAFCC8BADB}" + ProjectSection(SolutionItems) = preProject + LICENSE.txt = LICENSE.txt + README.md = README.md + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FritzCallMonitor.Demo", "src\FritzCallMonitor.Demo\FritzCallMonitor.Demo.csproj", "{6D718239-B477-4517-B8A5-9FBFCF3F3F2D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9951D44E-9511-40D0-84C1-6A7344389A05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9951D44E-9511-40D0-84C1-6A7344389A05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9951D44E-9511-40D0-84C1-6A7344389A05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9951D44E-9511-40D0-84C1-6A7344389A05}.Release|Any CPU.Build.0 = Release|Any CPU + {7C5920EA-F4A8-4446-9645-3484DB13BCBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C5920EA-F4A8-4446-9645-3484DB13BCBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C5920EA-F4A8-4446-9645-3484DB13BCBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C5920EA-F4A8-4446-9645-3484DB13BCBD}.Release|Any CPU.Build.0 = Release|Any CPU + {6D718239-B477-4517-B8A5-9FBFCF3F3F2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D718239-B477-4517-B8A5-9FBFCF3F3F2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D718239-B477-4517-B8A5-9FBFCF3F3F2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D718239-B477-4517-B8A5-9FBFCF3F3F2D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {9951D44E-9511-40D0-84C1-6A7344389A05} = {C386CB98-2D60-4E40-B869-73053972BD28} + {7C5920EA-F4A8-4446-9645-3484DB13BCBD} = {DC8CE4B0-4CDD-4162-9CCD-FE711BC86EAB} + {3DF1F30A-77F3-4F24-8739-CB89EE07BB8B} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {6FA27A08-FCE1-405E-A4A4-3A89FF4579F3} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {B5851E79-416B-40CA-959C-ADCAFCC8BADB} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {6D718239-B477-4517-B8A5-9FBFCF3F3F2D} = {C386CB98-2D60-4E40-B869-73053972BD28} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {68E37BBB-3CC2-4B0B-8093-7F2F56345EF3} + EndGlobalSection +EndGlobal diff --git a/FritzCallMonitor.snk b/FritzCallMonitor.snk new file mode 100644 index 0000000..1cf12d2 Binary files /dev/null and b/FritzCallMonitor.snk differ diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..e219de2 --- /dev/null +++ b/nuget.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/package-icon.png b/package-icon.png new file mode 100644 index 0000000..37b10f2 Binary files /dev/null and b/package-icon.png differ diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000..07dd461 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,54 @@ + + + enable + {semvertag:main}{!:-dev} + ../../FritzCallMonitor.snk + + true + false + true + + git + https://github.com/AM-WD/FritzCallMonitor.git + true + + package-icon.png + README.md + LICENSE.txt + + true + snupkg + false + + CallMonitor implementation for FRITZ!Box + AM.WD + Andreas Müller + © {copyright:2025-} AM.WD + + + + true + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + diff --git a/src/FritzCallMonitor.Demo/FritzCallMonitor.Demo.csproj b/src/FritzCallMonitor.Demo/FritzCallMonitor.Demo.csproj new file mode 100644 index 0000000..555658f --- /dev/null +++ b/src/FritzCallMonitor.Demo/FritzCallMonitor.Demo.csproj @@ -0,0 +1,12 @@ + + + + Exe + net8.0 + + + + + + + diff --git a/src/FritzCallMonitor/FritzCallMonitor.csproj b/src/FritzCallMonitor/FritzCallMonitor.csproj new file mode 100644 index 0000000..608c2a4 --- /dev/null +++ b/src/FritzCallMonitor/FritzCallMonitor.csproj @@ -0,0 +1,28 @@ + + + + netstandard2.0;net6.0 + v[0-9]* + + AMWD.Net.Api.Fritz.CallMonitor + fritz box api call monitor + true + + amwd-fritz-callmonitor + AMWD.Net.Api.Fritz.CallMonitor + + FRITZ!Box CallMonitor + Implementation to read the real-time call monitor interface of FRITZ!Box. + + + + + + + + + + + + + diff --git a/src/FritzCallMonitor/README.md b/src/FritzCallMonitor/README.md new file mode 100644 index 0000000..3df8431 --- /dev/null +++ b/src/FritzCallMonitor/README.md @@ -0,0 +1,10 @@ +# FRITZ!Box Call Monitor + + +--- + +Published under MIT License (see [choose a license]). + +[![Buy me a Coffee](https://shields.am-wd.de/badge/PayPal-Buy_me_a_Coffee-yellow?style=flat&logo=paypal)](https://link.am-wd.de/donate) + +[choose a license]: https://choosealicense.com/licenses/mit/ diff --git a/test/Directory.Build.props b/test/Directory.Build.props new file mode 100644 index 0000000..ecb2bd8 --- /dev/null +++ b/test/Directory.Build.props @@ -0,0 +1,28 @@ + + + false + true + true + Cobertura + + ../../FritzCallMonitor.snk + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/test/FritzCallMonitor.Tests/FritzCallMonitor.Tests.csproj b/test/FritzCallMonitor.Tests/FritzCallMonitor.Tests.csproj new file mode 100644 index 0000000..299c314 --- /dev/null +++ b/test/FritzCallMonitor.Tests/FritzCallMonitor.Tests.csproj @@ -0,0 +1,11 @@ + + + + net8.0 + + + + + + +