#ifndef ANDROID_GUI_IDUMPTUNNEL_H #define ANDROID_GUI_IDUMPTUNNEL_H #include #include namespace android { class IDumpTunnel : public IInterface { protected: enum { DUMPTUNNEL_DUMP = IBinder::FIRST_CALL_TRANSACTION }; public: DECLARE_META_INTERFACE(DumpTunnel); virtual status_t kickDump(String8& /*result*/, const char* /*prefix*/) = 0; }; class BnDumpTunnel : public BnInterface { virtual status_t onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags = 0); }; // helper class for libgui_ext dynamic linking class DumpTunnelHelper : public Singleton { void* mSoHandle; bool (*mRegDumpPtr)(const sp&, const String8&); bool (*mUnregDumpPtr)(const String8&); public: DumpTunnelHelper(); virtual ~DumpTunnelHelper(); // register tunnel into guiext-server with a given key name // and need to unregister it back // in general usage, need to use identical key name for reg/unreg pair bool regDump(const sp& tunnel, const String8& key); bool unregDump(const String8& key); }; }; #endif