michael@0: /* michael@0: * michael@0: * Copyright 2013 Canonical Ltd. michael@0: * michael@0: * Licensed under the Apache License, Version 2.0 (the "License"); michael@0: * you may not use this file except in compliance with the License. michael@0: * You may obtain a copy of the License at michael@0: * michael@0: * http://www.apache.org/licenses/LICENSE-2.0 michael@0: * michael@0: * Unless required by applicable law or agreed to in writing, michael@0: * software distributed under the License is distributed on an michael@0: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY michael@0: * KIND, either express or implied. See the License for the michael@0: * specific language governing permissions and limitations michael@0: * under the License. michael@0: * michael@0: */ michael@0: michael@0: #ifndef _VIBRATION_H_SFAFKNVX3456 michael@0: #define _VIBRATION_H_SFAFKNVX3456 michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: class Vibration: public CPlugin { michael@0: Q_OBJECT michael@0: public: michael@0: explicit Vibration(Cordova *cordova): CPlugin(cordova) { michael@0: } michael@0: michael@0: virtual const QString fullName() override { michael@0: return Vibration::fullID(); michael@0: } michael@0: michael@0: virtual const QString shortName() override { michael@0: return "Vibration"; michael@0: } michael@0: michael@0: static const QString fullID() { michael@0: return "Vibration"; michael@0: } michael@0: public slots: michael@0: void vibrate(int, int, int mills); michael@0: void cancelVibration(int, int); michael@0: void vibrateWithPattern(int, int, const QList &pattern, int); michael@0: michael@0: private: michael@0: QList> _effects; michael@0: QList> _timers; michael@0: }; michael@0: michael@0: #endif