FrameworkCommand.cpp revision 168415b822cae1f8b54ef09c41c11a9b97b87f40
1168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat/*
2168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * Copyright (C) 2008 The Android Open Source Project
3168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat *
4168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * Licensed under the Apache License, Version 2.0 (the "License");
5168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * you may not use this file except in compliance with the License.
6168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * You may obtain a copy of the License at
7168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat *
8168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat *      http://www.apache.org/licenses/LICENSE-2.0
9168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat *
10168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * Unless required by applicable law or agreed to in writing, software
11168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * distributed under the License is distributed on an "AS IS" BASIS,
12168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * See the License for the specific language governing permissions and
14168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat * limitations under the License.
15168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat */
16168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat#include <errno.h>
17168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat
18168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat#define LOG_TAG "FrameworkCommand"
19168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat
20168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat#include <cutils/log.h>
21168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat
22168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat#include <sysutils/FrameworkCommand.h>
23168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat
24168415b822cae1f8b54ef09c41c11a9b97b87f40San MehatFrameworkCommand::FrameworkCommand(const char *cmd) {
25168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat    mCommand = cmd;
26168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat}
27168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat
28168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehatint FrameworkCommand::runCommand(char *data) {
29168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat    LOGW("Command %s has no run handler!", getCommand());
30168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat    errno = ENOSYS;
31168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat    return -1;
32168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat}
33