Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D87E210BD5 for ; Thu, 5 Dec 2013 00:56:13 +0000 (UTC) Received: (qmail 31231 invoked by uid 500); 5 Dec 2013 00:56:13 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 31213 invoked by uid 500); 5 Dec 2013 00:56:13 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 31205 invoked by uid 99); 5 Dec 2013 00:56:13 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 00:56:13 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 693B132066A; Thu, 5 Dec 2013 00:56:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Date: Thu, 05 Dec 2013 00:56:13 -0000 Message-Id: <6bbdeb2414a4442e9fdb4c582d05abab@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] git commit: add ubuntu platform Updated Branches: refs/heads/master eae4edbcb -> 6f488ccf5 add ubuntu platform Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/commit/68e28df6 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/tree/68e28df6 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/diff/68e28df6 Branch: refs/heads/master Commit: 68e28df6c55b5a90d1ce79b3a09968f9ea12d4be Parents: 8db4f6d Author: Maxim Ermilov Authored: Tue Oct 8 11:34:44 2013 +0400 Committer: Maxim Ermilov Committed: Tue Oct 8 11:34:44 2013 +0400 ---------------------------------------------------------------------- plugin.xml | 15 +++++++++++++++ src/ubuntu/console.cpp | 29 +++++++++++++++++++++++++++++ src/ubuntu/console.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/68e28df6/plugin.xml ---------------------------------------------------------------------- diff --git a/plugin.xml b/plugin.xml index 49fcf83..4d012e0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -31,6 +31,21 @@ + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/68e28df6/src/ubuntu/console.cpp ---------------------------------------------------------------------- diff --git a/src/ubuntu/console.cpp b/src/ubuntu/console.cpp new file mode 100644 index 0000000..9de09f4 --- /dev/null +++ b/src/ubuntu/console.cpp @@ -0,0 +1,29 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "console.h" + +#include + +Console::Console(Cordova *cordova) : CPlugin(cordova) { +} + +void Console::logLevel(int scId, int ecId, QString level, QString message) { + Q_UNUSED(scId) + Q_UNUSED(ecId) + + if (level != "LOG") + std::cout << "[" << level.toStdString() << "] "; + std::cout << message.toStdString() << std::endl; +} http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/68e28df6/src/ubuntu/console.h ---------------------------------------------------------------------- diff --git a/src/ubuntu/console.h b/src/ubuntu/console.h new file mode 100644 index 0000000..3f3d163 --- /dev/null +++ b/src/ubuntu/console.h @@ -0,0 +1,43 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CONSOLE_H_FDSVCXGFRS +#define CONSOLE_H_FDSVCXGFRS + +#include + +#include + +class Console : public CPlugin { + Q_OBJECT +public: + explicit Console(Cordova *cordova); + + virtual const QString fullName() override { + return Console::fullID(); + } + + virtual const QString shortName() override { + return "Console"; + } + + static const QString fullID() { + return "Console"; + } + +public slots: + void logLevel(int scId, int ecId, QString level, QString message); +}; + +#endif