// Licensed to the Software Freedom Conservancy (SFC) under one1// or more contributor license agreements. See the NOTICE file2// distributed with this work for additional information3// regarding copyright ownership. The SFC licenses this file4// to you under the Apache License, Version 2.0 (the "License");5// you may not use this file except in compliance with the License.6// You may obtain a copy of the License at7//8// http://www.apache.org/licenses/LICENSE-2.09//10// Unless required by applicable law or agreed to in writing, software11// distributed under the License is distributed on an "AS IS" BASIS,12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13// See the License for the specific language governing permissions and14// limitations under the License.1516// Abstract class defining a session for the WebDriver server. Subclasses17// must implement methods to initialize, shutdown, and execute commands.1819#ifndef WEBDRIVER_SERVER_SESSION_H_20#define WEBDRIVER_SERVER_SESSION_H_2122#include <string>2324namespace webdriver {2526class Session {27public:28Session(void) {}29virtual ~Session(void) {}3031virtual void Initialize(void* init_params) = 0;32virtual void ShutDown(void) = 0;33virtual bool ExecuteCommand(const std::string& serialized_command,34std::string* serialized_response) = 0;3536//std::string session_id(void) const { return this->session_id_; }3738protected:39void set_session_id(const std::string& id) { this->session_id_ = id; }4041private:42// The unique ID of the session.43std::string session_id_;4445DISALLOW_COPY_AND_ASSIGN(Session);46};4748} // namespace webdriver4950#endif // WEBDRIVER_SERVER_SESSION_H_515253