mirror of
https://github.com/ioacademy-jikim/android_framwork
synced 2025-06-07 16:06:29 +00:00
32 lines
652 B
C++
32 lines
652 B
C++
#define LOG_TAG "LedService"
|
|
|
|
#include "ILedService.h"
|
|
|
|
#include <binder/IPCThreadState.h>
|
|
#include <binder/Parcel.h>
|
|
#include <unistd.h>
|
|
|
|
namespace android {
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
class BpLedService : public BpInterface<ILedService>
|
|
{
|
|
public:
|
|
explicit BpLedService(const sp<IBinder>& impl)
|
|
: BpInterface<ILedService>(impl)
|
|
{
|
|
}
|
|
|
|
virtual void ledOn(void)
|
|
{
|
|
printf("BpLedService::ledOn()\n");
|
|
Parcel data, reply;
|
|
remote()->transact(LED_ON, data, &reply);
|
|
}
|
|
};
|
|
|
|
IMPLEMENT_META_INTERFACE(LedService, "android.os.ILedService");
|
|
|
|
}; // namespace android
|