1 #ifndef _XECOMMLINK_HPP
2 #define _XECOMMLINK_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program Test Executor
5 * ------------------------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Communication link abstraction.
24 *//*--------------------------------------------------------------------*/
27 #include "xeCallQueue.hpp"
34 COMMLINKSTATE_READY, //!< CommLink is ready to accept commands.
35 COMMLINKSTATE_TEST_PROCESS_LAUNCHING, //!< Test process is launching. Allowed commands: stop process
36 COMMLINKSTATE_TEST_PROCESS_RUNNING, //!< Test process is running: Allowed commands: stop process
37 COMMLINKSTATE_TEST_PROCESS_FINISHED, //!< Test process is finished. Allowed commands: reset
39 COMMLINKSTATE_TEST_PROCESS_LAUNCH_FAILED, //!< Test process launch failed. Allowed commands: reset
40 COMMLINKSTATE_ERROR, //!< Other error occurred: Allowed commands: reset
45 const char* getCommLinkStateName (CommLinkState state);
50 typedef void (*StateChangedFunc) (void* userPtr, CommLinkState state, const char* message);
51 typedef void (*LogDataFunc) (void* userPtr, const deUint8* bytes, size_t numBytes);
54 virtual ~CommLink (void);
56 virtual void reset (void) = DE_NULL;
57 virtual CommLinkState getState (void) const = DE_NULL;
58 virtual CommLinkState getState (std::string& error) const = DE_NULL;
60 virtual void setCallbacks (StateChangedFunc stateChangedCallback, LogDataFunc testLogDataCallback, LogDataFunc infoLogDataCallback, void* userPtr) = DE_NULL;
62 virtual void startTestProcess (const char* name, const char* params, const char* workingDir, const char* caseList) = DE_NULL;
63 virtual void stopTestProcess (void) = DE_NULL;
68 #endif // _XECOMMLINK_HPP