/* * OProfile User Interface * * Copyright (C) 2007 Nokia Corporation. All rights reserved. * * Author: Robert Bradford * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA * */ #ifndef __COMMAND_H__ #define __COMMAND_H__ #include #define OPROFILEUI_LOCAL_SOCKET "/tmp/oprofileui.socket" #define OPROFILEUI_PROTO_VERSION 5 /* this is the enum for the opcode */ enum { COMMAND_OP_START, COMMAND_OP_STOP, COMMAND_OP_ARCHIVE, COMMAND_OP_GET, COMMAND_OP_RESET, COMMAND_OP_FILESTAT, COMMAND_OP_CONFIG, COMMAND_OP_STATUS = 69, /* for compatability */ }; typedef struct { uint8_t opcode; uint8_t reserved[3]; uint32_t length; uint8_t payload[]; } OpuiCommand; #define SIZE_OF_COMMAND(x) sizeof(OpuiCommand) + x->length #endif /* __COMMAND_H__ */