michael@0: /* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */ michael@0: /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: // This is a NPEventX11.h derived stub for Android michael@0: // Plugins aren't actually supported yet michael@0: michael@0: #ifndef mozilla_dom_plugins_NPEventAndroid_h michael@0: #define mozilla_dom_plugins_NPEventAndroid_h michael@0: michael@0: #include "npapi.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: namespace plugins { michael@0: michael@0: struct NPRemoteEvent { michael@0: NPEvent event; michael@0: }; michael@0: michael@0: } michael@0: michael@0: } michael@0: michael@0: michael@0: namespace IPC { michael@0: michael@0: template <> michael@0: struct ParamTraits michael@0: { michael@0: typedef mozilla::plugins::NPRemoteEvent paramType; michael@0: michael@0: static void Write(Message* aMsg, const paramType& aParam) michael@0: { michael@0: aMsg->WriteBytes(&aParam, sizeof(paramType)); michael@0: } michael@0: michael@0: static bool Read(const Message* aMsg, void** aIter, paramType* aResult) michael@0: { michael@0: const char* bytes = 0; michael@0: michael@0: if (!aMsg->ReadBytes(aIter, &bytes, sizeof(paramType))) { michael@0: return false; michael@0: } michael@0: michael@0: memcpy(aResult, bytes, sizeof(paramType)); michael@0: return true; michael@0: } michael@0: michael@0: static void Log(const paramType& aParam, std::wstring* aLog) michael@0: { michael@0: // TODO michael@0: aLog->append(L"(AndroidEvent)"); michael@0: } michael@0: }; michael@0: michael@0: } // namespace IPC michael@0: michael@0: michael@0: #endif // mozilla_dom_plugins_NPEventAndroid_h