1 /* 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public License 18 * along with this library; see the file COPYING.LIB. If not, write to 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef WebDOMTestCallback_h 24 #define WebDOMTestCallback_h 25 26 #if ENABLE(DATABASE) 27 28 #include <WebDOMObject.h> 29 #include <WebDOMString.h> 30 31 namespace WebCore { 32 class TestCallback; 33 }; 34 35 class WebDOMClass1; 36 class WebDOMClass2; 37 class WebDOMClass3; 38 class WebDOMClass5; 39 class WebDOMClass6; 40 class WebDOMDOMStringList; 41 42 class WebDOMTestCallback : public WebDOMObject { 43 public: 44 WebDOMTestCallback(); 45 explicit WebDOMTestCallback(WebCore::TestCallback*); 46 WebDOMTestCallback(const WebDOMTestCallback&); 47 WebDOMTestCallback& operator=(const WebDOMTestCallback&); 48 virtual ~WebDOMTestCallback(); 49 50 bool callbackWithNoParam(); 51 bool callbackWithClass1Param(const WebDOMClass1& class1Param); 52 bool callbackWithClass2Param(const WebDOMClass2& class2Param, const WebDOMString& strArg); 53 int callbackWithNonBoolReturnType(const WebDOMClass3& class3Param); 54 int customCallback(const WebDOMClass5& class5Param, const WebDOMClass6& class6Param); 55 bool callbackWithStringList(const WebDOMDOMStringList& listParam); 56 57 WebCore::TestCallback* impl() const; 58 59 protected: 60 struct WebDOMTestCallbackPrivate; 61 WebDOMTestCallbackPrivate* m_impl; 62 }; 63 64 WebCore::TestCallback* toWebCore(const WebDOMTestCallback&); 65 WebDOMTestCallback toWebKit(WebCore::TestCallback*); 66 67 #endif 68 #endif // ENABLE(DATABASE) 69 70