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 24696f267ff5a1e6227c2f5784dae60c190e0228b8Mark Salyzyn#define UNUSED __attribute__((unused)) 25696f267ff5a1e6227c2f5784dae60c190e0228b8Mark Salyzyn 26168415b822cae1f8b54ef09c41c11a9b97b87f40San MehatFrameworkCommand::FrameworkCommand(const char *cmd) { 27168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat mCommand = cmd; 28168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat} 29168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat 30696f267ff5a1e6227c2f5784dae60c190e0228b8Mark Salyzynint FrameworkCommand::runCommand(SocketClient *c UNUSED, int argc UNUSED, 31696f267ff5a1e6227c2f5784dae60c190e0228b8Mark Salyzyn char **argv UNUSED) { 327e8529a8b528fd30586aa037f15a31b29582c537San Mehat SLOGW("Command %s has no run handler!", getCommand()); 33168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat errno = ENOSYS; 34168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat return -1; 35168415b822cae1f8b54ef09c41c11a9b97b87f40San Mehat} 36