/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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: * * Copyright (C) 2011 Aleksander Morgado */ #ifndef MM_BASE_MODEM_AT_H #define MM_BASE_MODEM_AT_H #include #include "mm-base-modem.h" #include "mm-port-serial-at.h" typedef enum { MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE, MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS, MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_FAILURE, } MMBaseModemAtResponseProcessorResult; /* * The expected result depends on the specific operation, so the GVariant * created by the response processor needs to match the one expected in * finish(). * * SUCCESS must be returned when the operation is to be considered successful, * and a result may be given. * * FAILURE must be returned when a GError is propagated into result_error, * which will be treated as a critical error and therefore the operation will be aborted. * * CONTINUE must be returned when neither result nor result_error are given and * the operation should go on with the next scheduled command. * * This setup, therefore allows: * - Running a single command and processing its result. * - Running a set of N commands, providing a global result after all have * been executed. * - Running a set of N commands out of M (N