dbus 실례 설명(두 번째): 메시지와 메시지 버스

25098 단어
프로그램 A와 메시지 버스가 연결되어 있습니다. 이 연결은 모두가 알고 있는 공통 이름을 가져왔습니다. (연결 A라고 합니다.)응용 프로그램 A에 있는 대상 A1은 인터페이스 I1을 제공하고 인터페이스 I1은 방법 M1이 있다.응용 프로그램 B와 메시지 버스 연결, A에 연결된 대상 A1의 인터페이스 I1을 호출하는 방법 M1을 요구합니다.
앞에서 말한 덧셈 예에서, 위의 이 말은 응용 프로그램 example-s 서비스와 세션 버스 연결을 실례화할 수 있다.이 연결은 모두가 알고 있는 공명 'org.fmddlmyy.Test' 를 가져왔습니다.응용 프로그램 example-servic에서 대상'/TestObj'는 인터페이스'org.fmddlmy.Test.Basic', 인터페이스'org.fmddlmyy.Test.Basic'는 방법'Add'가 있습니다.프로그램 d-feet과 세션 버스가 연결되어 있습니다. "org. fmddlmyy. Test"의 대상 "/TestObj"의 인터페이스 "org. fmddlmyy. Test. Basic"를 연결하는 방법 "Add"를 호출해야 합니다.
응용 프로그램 B가 응용 프로그램 A를 호출하는 방법은 사실 응용 프로그램 B가 응용 프로그램 A에'method call'형식의 메시지를 보내는 것이다.응용 프로그램 A는 "method retutn"유형의 메시지를 통해 반환 값을 응용 프로그램 B에 보냅니다.D-Bus 버스에 대한 정보를 간략하게 소개하겠습니다.

1. D-Bus의 소식


앞서 말했듯이 가장 기본적인 D-Bus 프로토콜은 일대일 통신 프로토콜이다.Socket을 직접 사용하는 것과 달리 D-Bus는 메시지를 위한 프로토콜입니다.D-Bus의 모든 기능은 연결에 흐르는 메시지를 통해 이루어진다.

1.1 메시지 유형


D-Bus에는 다음과 같은 네 가지 유형의 메시지가 있습니다.
  • method_call 방법 호출
  • method_return 방법 반환
  • error 오류
  • signal 신호
  • 앞에서 설명한 원격 방법 호출은methodcall 및 methodreturn 메시지.말 그대로 오류가 발생할 때 error 메시지가 발생합니다.하면, 만약, 만약...콜을 전화로 간주한다면 시그널 메시지는 전화가 온 것이다.뒷부분에서 또 상세하게 토론할 것이다.

    1.2 dbus-send 및 dbus-monitor


    dbus는 두 개의 작은 도구를 제공합니다: dbus-send와 dbus-monitor.우리는 dbus-send로 메시지를 보낼 수 있다.dbus-monitor로 버스에서 흐르는 소식을 감시하다.dbus-send를 통해 메시지를 보내서 앞의 Add 방법을 호출합니다. 이 때 dbus-send는 프로그램 B를 충당합니다.dbus-monitor로 호출 과정 중의 소식을 관찰하다.
    example-s 서비스를 시작하려면:
    $ ./example-service 
    

    다른 콘솔에서 dbus-monitor를 시작합니다.
    $ dbus-monitor
    

    dbus-monitor 기본 감시 세션 버스입니다.실행:
    $ dbus-send --session --type=method_call --print-reply --dest=org.fmddlmyy.Test /TestObj org.fmddlmyy.Test.Basic.Add int32:100 int32:999
    

    출력:
    method return sender=:1.21 -> dest=:1.22 reply_serial=2
       int32 1099
    

    dbus-monitor 관련 출력은 다음과 같습니다.
    signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
       string ":1.22"
       string ""
       string ":1.22"
    method call sender=:1.22 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
    method call sender=:1.22 -> dest=org.fmddlmyy.Test path=/TestObj; interface=org.fmddlmyy.Test.Basic; member=Add
       int32 100
       int32 999
    method return sender=:1.21 -> dest=:1.22 reply_serial=2
       int32 1099
    signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
       string ":1.22"
       string ":1.22"
       string ""
    

    : 1.22는 dbus-send가 이번 호출에서 세션 버스와 연결한 유일한 이름입니다.1.21은 "org.fmddlmyy.Test"를 연결하는 고유한 이름입니다.상기 출력에서 우리는 1.22가 "org.fmddlmyy.Test"에 method 를 보내는 것을 볼 수 있다.콜 메시지, Add 메서드를 호출합니다.:1.21 method 통과return 메시지가 호출 결과를 1.22로 보냅니다.추가 출력 정보는 나중에 설명합니다.
    dbus-send의 상세한 사용법은 수첩을 참조할 수 있습니다.일반적으로 원격 메서드를 호출하는 방법은 다음과 같습니다.
    $ dbus-send [--system | --session] --type=method_call --print-reply --dest=     .   :   : 
    

    dbus-send가 지원하는 매개 변수 형식은string, int32, uint32, 더블,byte,boolean입니다.

    2. 메시지 버스의 방법과 신호


    2.1 개요


    메시지 버스는 특수한 응용으로 연결된 응용 프로그램 사이에서 메시지를 전달할 수 있다.메시지 버스를 공유기로 볼 수 있다.바로 메시지 버스를 통해 D-Bus는 일대일 통신 프로토콜을 바탕으로 다대일과 일대다의 통신을 실현했다.
    메시지 버스는 비록 특수한 전송 기능이 있지만 메시지 버스도 여전히 하나의 응용 프로그램이다.다른 응용 프로그램과 메시지 버스의 통신도 1.1절의 기본 메시지 유형을 통해 이루어졌다.응용 프로그램으로서 메시지 버스도 방법과 신호를 포함한 자신의 인터페이스를 제공했다.
    우리는 'org.freedesktop.DBus' 에 연결된 대상'/'에게 메시지를 보내서 메시지 버스가 제공하는 방법을 호출할 수 있습니다.사실상 응용 프로그램은 이러한 방법을 통해 메시지 버스에 연결된 다른 응용 프로그램으로 공공 이름을 요청하는 작업을 완성한다.

    2.2 명세서


    메시지 버스 대상은 제1강에서 언급한 표준 인터페이스 'org.freedesktop.Dbus.Introspectable' 을 지원합니다. 우리는 org를 호출할 수 있습니다.freedesktop.DBus.Introspectable.Introspect 메서드는 메시지 버스 객체가 지원하는 인터페이스를 봅니다.예를 들면 다음과 같습니다.
    $ dbus-send --session --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.Introspectable.Introspect
    

    출력:
    method return sender=org.freedesktop.DBus -> dest=:1.20 reply_serial=2
       string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
    "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
    <node>
      <interface name="org.freedesktop.DBus.Introspectable">
        <method name="Introspect">
          <arg name="data" direction="out" type="s"/>
        </method>
      </interface>
      <interface name="org.freedesktop.DBus">
        <method name="Hello">
          <arg direction="out" type="s"/>
        </method>
        <method name="RequestName">
          <arg direction="in" type="s"/>
          <arg direction="in" type="u"/>
          <arg direction="out" type="u"/>
        </method>
        <method name="ReleaseName">
          <arg direction="in" type="s"/>
          <arg direction="out" type="u"/>
        </method>
        <method name="StartServiceByName">
          <arg direction="in" type="s"/>
          <arg direction="in" type="u"/>
          <arg direction="out" type="u"/>
        </method>
        <method name="NameHasOwner">
          <arg direction="in" type="s"/>
          <arg direction="out" type="b"/>
        </method>
        <method name="ListNames">
          <arg direction="out" type="as"/>
        </method>
        <method name="ListActivatableNames">
          <arg direction="out" type="as"/>
        </method>
        <method name="AddMatch">
          <arg direction="in" type="s"/>
        </method>
        <method name="RemoveMatch">
          <arg direction="in" type="s"/>
        </method>
        <method name="GetNameOwner">
          <arg direction="in" type="s"/>
          <arg direction="out" type="s"/>
        </method>
        <method name="ListQueuedOwners">
          <arg direction="in" type="s"/>
          <arg direction="out" type="as"/>
        </method>
        <method name="GetConnectionUnixUser">
          <arg direction="in" type="s"/>
          <arg direction="out" type="u"/>
        </method>
        <method name="GetConnectionUnixProcessID">
          <arg direction="in" type="s"/>
          <arg direction="out" type="u"/>
        </method>
        <method name="GetConnectionSELinuxSecurityContext">
          <arg direction="in" type="s"/>
          <arg direction="out" type="ay"/>
        </method>
        <method name="ReloadConfig">
        </method>
        <method name="GetId">
          <arg direction="out" type="s"/>
        </method>
        <signal name="NameOwnerChanged">
          <arg type="s"/>
          <arg type="s"/>
          <arg type="s"/>
        </signal>
        <signal name="NameLost">
          <arg type="s"/>
        </signal>
        <signal name="NameAcquired">
          <arg type="s"/>
        </signal>
      </interface>
    </node>
    "
    

    출력에서 세션 버스 대상이 지원하는 표준 인터페이스 'org.freedesktop.DBus.Introspectable' 과 인터페이스 'org.freedesktop.DBus' 를 볼 수 있습니다.인터페이스'org.freedesktop.DBus'에는 16개의 방법과 3개의 신호가 있다.다음 표에는 "org.freedesktop.DBus"의 12가지 방법에 대한 간략한 설명이 나와 있습니다.
    org.freedesktop.DBus.RequestName (in STRING name, in UINT32 flags, out UINT32 reply)
    공명을 청하다.여기서 flag 정의는 다음과 같습니다. DBUSNAME_FLAG_ALLOW_REPLACEMENT 1 DBUS_NAME_FLAG_REPLACE_EXISTING 2 DBUS_NAME_FLAG_DO_NOT_QUEUE 4 반환값 reply는 다음과 같이 정의됩니다: DBUSREQUEST_NAME_REPLY_PRIMARY_OWNER 1 DBUS_REQUEST_NAME_REPLY_IN_QUEUE 2 DBUS_REQUEST_NAME_REPLY_EXISTS 3 DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
    org.freedesktop.DBus.ReleaseName (in STRING name, out UINT32 reply)
    공명을 석방하다.반환값 reply는 다음과 같이 정의됩니다: DBUSRELEASE_NAME_REPLY_RELEASED 1 DBUS_RELEASE_NAME_REPLY_NON_EXISTENT 2 DBUS_RELEASE_NAME_REPLY_NOT_OWNER 3 
    org.freedesktop.DBus.Hello (out STRING unique_name)
    메시지 버스를 통해 다른 프로그램에 메시지를 보내기 전에 Hello를 호출해서 연결의 유일한 이름을 가져와야 합니다.되돌아오는 값은 연결의 유일한 이름입니다.dbus는 연결을 끊는 명령을 정의하지 않았습니다. socket을 닫는 것은 연결을 끊는 것입니다.1.2절의 dbus-monitor 출력에서 dbus-send가 메시지 버스를 호출하는 Hello 방법을 볼 수 있습니다.
    org.freedesktop.DBus.ListNames (out ARRAY of STRING bus_names)
    메시지 버스에 연결된 모든 연결 이름을 되돌려줍니다. 모든 공공 이름과 유일한 이름을 포함합니다.예를 들어'org.fmddlmyy.Test'를 연결하면 공통 이름인'org.fmddlmyy.Test'와 유일한 이름인':1.21'이 모두 되돌아온다.
    org.freedesktop.DBus.ListActivatableNames (out ARRAY of STRING bus_names)
    시작할 수 있는 모든 서비스 이름을 되돌려줍니다.dbus는 프로그램의 요청에 따라 서비스를 시작할 수 있습니다.
    org.freedesktop.DBus.NameHasOwner (in STRING name, out BOOLEAN has_owner)
    지정한 이름을 가진 연결이 있는지 확인하십시오.
    org.freedesktop.DBus.StartServiceByName (in STRING name, in UINT32 flags, out UINT32 ret_val)
    이름으로 서비스를 시작합니다.flags 매개변수는 아직 사용되지 않습니다.반환값 retval 정의는 다음과 같습니다: 1 서비스가 성공적으로 시작되었습니다. 2 시작할 서비스 이름이 연결되었습니다.
    org.freedesktop.DBus.GetNameOwner (in STRING name, out STRING unique_connection_name)
    지정한 공명을 가진 연결의 유일한 이름을 되돌려줍니다.
    org.freedesktop.DBus.GetConnectionUnixUser (in STRING connection_name, out UINT32 unix_user_id)
    지정된 서버 프로세스에 대한 Unix 사용자 id를 반환합니다.
    org.freedesktop.DBus.AddMatch (in STRING rule)
    현재 연결에 일치하는 규칙을 추가합니다.
    org.freedesktop.DBus.RemoveMatch (in STRING rule)
    현재 연결을 위해 지정한 일치 규칙을 삭제합니다.
    org.freedesktop.DBus.GetId (out STRING id)
    메시지 버스의 ID를 반환합니다.이 ID는 메시지 버스의 생명 기간 내에 유일하다.
    인터페이스 "org.freedesktop.DBus"의 세 가지 신호는 다음과 같습니다.
    org.freedesktop.DBus.NameOwnerChanged (STRING name, STRING old_owner, STRING new_owner)
    지정된 이름의 소유자가 변경되었습니다.
    org.freedesktop.DBus.NameLost (STRING name)
    알림 프로그램이 지정한 이름의 소유권을 잃었습니다.
    org.freedesktop.DBus.NameAcquired (STRING name)
    알림 응용 프로그램이 지정한 이름의 소유권을 얻었습니다.

    2.3 연습


    정보 버스가 제공하는 방법을 시험해 봅시다.

    2.3.1 ListName에서 d-feet까지의 기본 논리


    dbus-send를 사용하여 호출하려면:
    $ dbus-send --session --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames
    

    출력:
    method return sender=org.freedesktop.DBus -> dest=:1.23 reply_serial=2
       array [
          string "org.freedesktop.DBus"
          string "org.freedesktop.Notifications"
          string "org.freedesktop.Tracker"
          string "org.freedesktop.PowerManagement"
          string ":1.7"
          string ":1.8"
          string "org.gnome.ScreenSaver"
          string ":1.9"
          string ":1.10"
          string ":1.22"
          string ":1.11"
          string "org.gnome.GnomeVFS.Daemon"
          string ":1.23"
          string ":1.12"
          string ":1.13"
          string ":1.0"
          string ":1.14"
          string ":1.1"
          string ":1.15"
          string ":1.2"
          string ":1.16"
          string ":1.3"
          string "org.gnome.GkbdConfigRegistry"
          string ":1.4"
          string "org.fmddlmyy.Test"
          string ":1.5"
          string "org.gnome.SettingsDaemon"
          string ":1.6"
       ]
    

    세션 버스가 현재 접속되어 있는 접속 이름입니다.d-feet 창의 왼쪽 창에는 ListNames가 되돌아오는 연결 이름이 표시됩니다.똑똑한 독자들은 메시지 버스의'org.freedesktop.Dbus.ListNames'방법과 각각 연결된'org.freedesktop.Dbus.Introspectable.Introspect'를 생각하고 있을지도 모른다. 우리는 d-feet처럼 버스에 연결된 모든 대상의 모든 인터페이스의 모든 방법과 신호를 볼 수 있다.
    너의 생각은 매우 좋다.그러나 질문 하나가 있습니다. 연결 중인 대상에 대해 'org.freedesktop.DBus.Introspectable.Introspect' 방법을 호출해야 합니다.ListNames는 연결 이름만 보여 줍니다. 연결 중의 대상 경로를 어떻게 가져올까요?
    답은 간단하다. 만약 우리가 대상 경로를 모른다면 루트 디렉터리부터 시작해라.연결 중인 객체는 트리 구조에 따라 구성됩니다.우리가 연결된 대상 트리를 두루 훑어보면 모든 대상을 찾을 수 있다.대상의 'org.freedesktop.Dbus.Introspectable.Introspect' 방법을 호출하면 대상의 모든 인터페이스의 모든 방법과 신호를 볼 수 있습니다.예를 들어 "org.fmddlmyy.Test"연결에 어떤 대상이 있는지 모른다고 가정하면 루트 대상 "/"을 실행할 수 있습니다.
    $ dbus-send --session --type=method_call --print-reply --dest=org.fmddlmyy.Test / org.freedesktop.DBus.Introspectable.Introspect
    

    출력:
    method return sender=:1.22 -> dest=:1.25 reply_serial=2
       string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
    "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
    <node>
      <node name="TestObj"/>
    </node>
    "
    

    "org.fmddlmyy.Test"개체 트리의 루트 노드에는 "TestObj"하위 노드가 한 개만 있습니다. "/TestObj"를 보려면 다음과 같이 하십시오.
    $ dbus-send --session --type=method_call --print-reply --dest=org.fmddlmyy.Test /TestObj org.freedesktop.DBus.Introspectable.Introspect
    

    출력:
    method return sender=:1.22 -> dest=:1.26 reply_serial=2
       string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
    "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
    <node>
      <interface name="org.freedesktop.DBus.Introspectable">
        <method name="Introspect">
          <arg name="data" direction="out" type="s"/>
        </method>
      </interface>
      <interface name="org.freedesktop.DBus.Properties">
        <method name="Get">
          <arg name="interface" direction="in" type="s"/>
          <arg name="propname" direction="in" type="s"/>
          <arg name="value" direction="out" type="v"/>
        </method>
        <method name="Set">
          <arg name="interface" direction="in" type="s"/>
          <arg name="propname" direction="in" type="s"/>
          <arg name="value" direction="in" type="v"/>
        </method>
        <method name="GetAll">
          <arg name="interface" direction="in" type="s"/>
          <arg name="props" direction="out" type="a{sv}"/>
        </method>
      </interface>
      <interface name="org.fmddlmyy.Test.Basic">
        <method name="Add">
          <arg name="arg0" type="i" direction="in"/>
          <arg name="arg1" type="i" direction="in"/>
          <arg name="ret" type="i" direction="out"/>
        </method>
      </interface>
    </node>
    "
    

    연습으로 시스템 버스의 블루즈 인터페이스를 살펴보자.실행:
    $ dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames
    

    출력:
    method return sender=org.freedesktop.DBus -> dest=:1.30 reply_serial=2
       array [
          string "org.freedesktop.DBus"
          string ":1.7"
          string ":1.8"
          string ":1.9"
          string "org.freedesktop.SystemToolsBackends"
          string ":1.30"
          string "org.freedesktop.NetworkManagerInfo"
          string ":1.20"
          string "org.freedesktop.Avahi"
          string ":1.21"
          string "org.bluez"
          string ":1.22"
          string "org.freedesktop.NetworkManager"
          string "org.freedesktop.ConsoleKit"
          string ":1.23"
          string "com.redhat.dhcp"
          string ":1.13"
          string ":1.0"
          string ":1.14"
          string ":1.1"
          string ":1.15"
          string ":1.2"
          string "org.freedesktop.Hal"
          string "com.redhat.NewPrinterNotification"
          string ":1.16"
          string ":1.3"
          string ":1.17"
          string ":1.4"
          string ":1.18"
          string ":1.5"
          string ":1.19"
          string ":1.6"
       ]
    

    우리는'org.bluez'를 연결하는 것을 보았다.루트 객체를 보려면 다음과 같이 하십시오.
    $ dbus-send --system --type=method_call --print-reply --dest=org.bluez / org.freedesktop.DBus.Introspectable.Introspect
    

    출력:
    method return sender=:1.7 -> dest=:1.31 reply_serial=2
       string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
    "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
    <node>
      <node name="org"/>
    </node>
    "
    

    그런 다음 객체 "/org"를 찾습니다.
    $ dbus-send --system --type=method_call --print-reply --dest=org.bluez /org org.freedesktop.DBus.Introspectable.Introspect
    

    출력:
    method return sender=:1.7 -> dest=:1.32 reply_serial=2
       string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
    "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
    <node>
      <node name="bluez"/>
    </node>
    "
    

    그런 다음 객체 "/org/bluez"를 찾습니다.
    $ dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez org.freedesktop.DBus.Introspectable.Introspect
    

    출력:
    method return sender=:1.7 -> dest=:1.33 reply_serial=2
       string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
    "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
    <node name="/org/bluez">
            <interface name="org.bluez.Manager">
                    <method name="InterfaceVersion">
                            <arg type="u" direction="out"/>
                    </method>
                    <method name="DefaultAdapter">
                            <arg type="s" direction="out"/>
                    </method>
                    <method name="FindAdapter">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="out"/>
                    </method>
                    <method name="ListAdapters">
                            <arg type="as" direction="out"/>
                    </method>
                    <method name="FindService">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="out"/>
                    </method>
                    <method name="ListServices">
                            <arg type="as" direction="out"/>
                    </method>
                    <method name="ActivateService">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="out"/>
                    </method>
                    <signal name="AdapterAdded">
                            <arg type="s"/>
                    </signal>
                    <signal name="AdapterRemoved">
                            <arg type="s"/>
                    </signal>
                    <signal name="DefaultAdapterChanged">
                            <arg type="s"/>
                    </signal>
                    <signal name="ServiceAdded">
                            <arg type="s"/>
                    </signal>
                    <signal name="ServiceRemoved">
                            <arg type="s"/>
                    </signal>
            </interface>
            <interface name="org.bluez.Database">
                    <method name="AddServiceRecord">
                            <arg type="ay" direction="in"/>
                            <arg type="u" direction="out"/>
                    </method>
                    <method name="AddServiceRecordFromXML">
                            <arg type="s" direction="in"/>
                            <arg type="u" direction="out"/>
                    </method>
                    <method name="UpdateServiceRecord">
                            <arg type="u" direction="in"/>
                            <arg type="ay" direction="in"/>
                    </method>
                    <method name="UpdateServiceRecordFromXML">
                            <arg type="u" direction="in"/>
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="RemoveServiceRecord">
                            <arg type="u" direction="in"/>
                    </method>
                    <method name="RegisterService">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="UnregisterService">
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="RequestAuthorization">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="CancelAuthorizationRequest">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="in"/>
                    </method>
            </interface>
            <interface name="org.bluez.Security">
                    <method name="RegisterDefaultPasskeyAgent">
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="UnregisterDefaultPasskeyAgent">
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="RegisterPasskeyAgent">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="UnregisterPasskeyAgent">
                            <arg type="s" direction="in"/>
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="RegisterDefaultAuthorizationAgent">
                            <arg type="s" direction="in"/>
                    </method>
                    <method name="UnregisterDefaultAuthorizationAgent">
                            <arg type="s" direction="in"/>
                    </method>
            </interface>
            <node name="service_audio"/>
            <node name="service_input"/>
            <node name="service_network"/>
            <node name="service_serial"/>
    </node>
    "
    

    우리는 대상'/org/bluez'의 모든 인터페이스를 보았다.대상'/org/bluez'에는 서브노드'서비스 audio','서비스 input','서비스 network','서비스 serial'도 있다.필요할 때 우리는 이어서 조사해 나갈 수 있다.d-feet의 기본 논리는 이렇다.나중에 우리는 스스로 dteeth를 실현할 것이다.tteeth는 명령행 프로그램으로 지정한 연결 대상 트리를 옮겨다니며 모든 대상의 모든 인터페이스를 보여 주는 방법과 신호입니다.
     
    출처:http://www.fmddlmyy.cn/text52.html

    좋은 웹페이지 즐겨찾기