Skip to content

Conversation

@fly602
Copy link
Contributor

@fly602 fly602 commented Dec 11, 2025

Updated D-Bus service names and paths for IPWatchD from old naming convention to new DDE standard:

  • Changed service name from "com.deepin.system.IPWatchD" to "org.deepin.dde.IPWatchD1"
  • Changed object path from "/com/deepin/system/IPWatchD" to "/org/ deepin/dde/IPWatchD1"
  • Changed interface name from "com.deepin.system.IPWatchD" to "org.deepin.dde.IPWatchD1"

This change is necessary to align with the updated D-Bus service naming conventions in the deepin desktop environment, ensuring proper communication with the IP conflict detection service.

Influence:

  1. Test IP conflict detection functionality to ensure it works with the new D-Bus service
  2. Verify that the plugin can successfully connect to the IPWatchD service
  3. Check that IP conflict notifications are properly received and handled
  4. Test network connection scenarios that might trigger IP conflicts

fix: 更新IPWatchD的D-Bus服务接口

将IPWatchD的D-Bus服务名称和路径从旧命名规范更新为新DDE标准:

  • 服务名称从"com.deepin.system.IPWatchD"改为"org.deepin.dde.IPWatchD1"
  • 对象路径从"/com/deepin/system/IPWatchD"改为"/org/deepin/dde/IPWatchD1"
  • 接口名称从"com.deepin.system.IPWatchD"改为"org.deepin.dde.IPWatchD1"

此更改是为了与深度桌面环境中更新的D-Bus服务命名规范保持一致,确保与IP冲
突检测服务的正常通信。

Influence:

  1. 测试IP冲突检测功能,确保其能与新的D-Bus服务正常工作
  2. 验证插件是否能成功连接到IPWatchD服务
  3. 检查IP冲突通知是否正确接收和处理
  4. 测试可能触发IP冲突的网络连接场景

Summary by Sourcery

Enhancements:

  • Update IPWatchD D-Bus service name, object path, and interface to the new org.deepin.dde.IPWatchD1 standard.

Updated D-Bus service names and paths for IPWatchD from old naming
convention to new DDE standard:
- Changed service name from "com.deepin.system.IPWatchD" to
"org.deepin.dde.IPWatchD1"
- Changed object path from "/com/deepin/system/IPWatchD" to "/org/
deepin/dde/IPWatchD1"
- Changed interface name from "com.deepin.system.IPWatchD" to
"org.deepin.dde.IPWatchD1"

This change is necessary to align with the updated D-Bus service
naming conventions in the deepin desktop environment, ensuring proper
communication with the IP conflict detection service.

Influence:
1. Test IP conflict detection functionality to ensure it works with the
new D-Bus service
2. Verify that the plugin can successfully connect to the IPWatchD
service
3. Check that IP conflict notifications are properly received and
handled
4. Test network connection scenarios that might trigger IP conflicts

fix: 更新IPWatchD的D-Bus服务接口

将IPWatchD的D-Bus服务名称和路径从旧命名规范更新为新DDE标准:
- 服务名称从"com.deepin.system.IPWatchD"改为"org.deepin.dde.IPWatchD1"
- 对象路径从"/com/deepin/system/IPWatchD"改为"/org/deepin/dde/IPWatchD1"
- 接口名称从"com.deepin.system.IPWatchD"改为"org.deepin.dde.IPWatchD1"

此更改是为了与深度桌面环境中更新的D-Bus服务命名规范保持一致,确保与IP冲
突检测服务的正常通信。

Influence:
1. 测试IP冲突检测功能,确保其能与新的D-Bus服务正常工作
2. 验证插件是否能成功连接到IPWatchD服务
3. 检查IP冲突通知是否正确接收和处理
4. 测试可能触发IP冲突的网络连接场景
@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个diff进行代码审查:

  1. 语法逻辑:
  • 修改内容仅涉及字符串常量的更新,语法上没有问题
  • 修改后的DBus命名遵循了标准的命名规范,使用反向域名格式
  1. 代码质量:
  • 建议将这三个相关的常量定义组合在一起,可以考虑使用结构体或命名空间来封装,提高代码的可维护性
  • 可以考虑添加注释说明这些常量的用途,特别是DBus相关的路径和服务名
  1. 代码性能:
  • 由于只是字符串常量的修改,对性能没有影响
  • 这些常量在编译期就会被确定,不会有运行时开销
  1. 代码安全:
  • 修改后的DBus服务名和路径遵循了更规范的安全命名约定
  • 使用"org.deepin.dde"替代"com.deepin.system"更符合当前项目的架构

改进建议:

  1. 建议将这些常量封装到一个命名空间中,例如:
namespace IPWatchD {
    const QString Service = "org.deepin.dde.IPWatchD1";
    const QString Path = "/org/deepin/dde/IPWatchD1";
    const QString Interface = "org.deepin.dde.IPWatchD1";
}
  1. 添加适当的注释说明这些DBus接口的用途
  2. 考虑使用constexpr替代const,因为这些是编译期常量:
constexpr QString ipwatchdService = "org.deepin.dde.IPWatchD1";
  1. 如果这些常量在其他地方也需要使用,建议将它们移到一个公共的头文件中,避免重复定义

总的来说,这个修改是正确的,主要是为了更新DBus接口的命名规范。建议的改进主要是为了提高代码的可维护性和可读性。

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 11, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the IP conflict handler to use the new DDE-standard D-Bus service, object path, and interface names for IPWatchD so it talks to the updated daemon instead of the legacy one.

Sequence diagram for IP conflict handling via updated IPWatchD D-Bus interface

sequenceDiagram
    participant NetworkServicePlugin
    participant DBusSystemBus
    participant IPWatchD1Daemon

    NetworkServicePlugin->>DBusSystemBus: Connect(ipwatchdService=org.deepin.dde.IPWatchD1, ipwatchdPath=/org/deepin/dde/IPWatchD1, ipwatchdInterface=org.deepin.dde.IPWatchD1)
    DBusSystemBus->>IPWatchD1Daemon: Establish D-Bus connection
    IPWatchD1Daemon-->>DBusSystemBus: Connection ready
    DBusSystemBus-->>NetworkServicePlugin: Connection established

    IPWatchD1Daemon-->>DBusSystemBus: IPConflictDetected signal
    DBusSystemBus-->>NetworkServicePlugin: IPConflictDetected signal
    NetworkServicePlugin->>NetworkServicePlugin: HandleIPConflict
Loading

File-Level Changes

Change Details Files
Switch IPWatchD D-Bus identifiers from the legacy com.deepin.system.* namespace to the new org.deepin.dde.* standard.
  • Update the D-Bus service name constant to org.deepin.dde.IPWatchD1
  • Update the D-Bus object path constant to /org/deepin/dde/IPWatchD1
  • Update the D-Bus interface name constant to org.deepin.dde.IPWatchD1
network-service-plugin/src/ipconflicthandler.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Since the D-Bus service, path, and interface names are now using the new org.deepin.dde.IPWatchD1 scheme, consider centralizing these constants in a shared header or configuration to avoid hard-coded duplicates and reduce the risk of inconsistencies across the codebase.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since the D-Bus service, path, and interface names are now using the new org.deepin.dde.IPWatchD1 scheme, consider centralizing these constants in a shared header or configuration to avoid hard-coded duplicates and reduce the risk of inconsistencies across the codebase.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: caixr23, fly602

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fly602 fly602 merged commit 3a2c23e into linuxdeepin:master Dec 12, 2025
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants