QAndroidServiceConnection Class
안드로이드 서비스커넥션 클래스의 가장 중요한 메서드를 래핑합니다. 더 보기...
Header: | #include <QtCore/private/qandroidextras_p.h> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::CorePrivate) |
qmake: | QT += core-private |
이후: | Qt 6.2 |
상태: | 예비 |
이 클래스는 개발 중이며 변경될 수 있습니다.
공용 함수
QAndroidServiceConnection() | |
QAndroidServiceConnection(const QJniObject &serviceConnection) | |
QJniObject | handle() const |
virtual void | onServiceConnected(const QString &name, const QAndroidBinder &serviceBinder) = 0 |
virtual void | onServiceDisconnected(const QString &name) = 0 |
상세 설명
QAndroid서비스 연결은 안드로이드서비스 연결 인터페이스를 감싸는 편의 추상 클래스입니다.
QtAndroidPrivate::bindService 작업을 수행할 때 유용합니다.
멤버 함수 문서
QAndroidServiceConnection::QAndroidServiceConnection()
새 객체를 만듭니다.
[explicit]
QAndroidServiceConnection::QAndroidServiceConnection(const QJniObject &serviceConnection)
기존 serviceConnection 에서 새 객체를 만듭니다.
자체 Java 구현이 있을 때 유용합니다. 물론 onServiceConnected()/onServiceDisconnected()은 더 이상 호출되지 않습니다.
QJniObject QAndroidServiceConnection::handle() const
밑줄을 반환합니다. QJniObject
[pure virtual]
void QAndroidServiceConnection::onServiceConnected(const QString &name, const QAndroidBinder &serviceBinder)
이 알림은 클라이언트가 서비스에 연결하는 데 성공했을 때 호출됩니다. name 에는 서버 이름이 포함되며 serviceBinder 은 클라이언트가 IPC 작업을 수행하는 데 사용하는 바인더입니다.
경고: 이 메서드는 이 객체가 생성된 스레드와 다른 바인더의 스레드에서 호출됩니다.
밑줄을 반환합니다. QJniObject
[pure virtual]
void QAndroidServiceConnection::onServiceDisconnected(const QString &name)
서비스에 대한 연결이 끊어졌을 때 호출됩니다. name 매개변수는 어떤 연결이 끊어졌는지 지정합니다.
경고: 이 메서드는 이 객체가 생성된 스레드와 다른 바인더의 스레드에서 호출됩니다.
밑줄을 반환합니다. QJniObject
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.