#define LOG_TAG "LedService" #include "ILedService.h" #include #include #include namespace android { // ---------------------------------------------------------------------- class BpLedService : public BpInterface { public: explicit BpLedService(const sp& impl) : BpInterface(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"); // ---------------------------------------------------------------------- status_t BnLedService::onTransact( uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) { switch (code) { case LED_ON: { ledOn(); return NO_ERROR; } break; default: return BBinder::onTransact(code, data, reply, flags); } } // ---------------------------------------------------------------------- }; // namespace android