15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file.
45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_CONFIG_H_
65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_CONFIG_H_
75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <string>
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/basictypes.h"
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace base {
13a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)class CommandLine;
14a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)class FilePath;
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Class used to start a test license server.
185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class TestLicenseServerConfig {
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public:
205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  TestLicenseServerConfig() {}
215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual ~TestLicenseServerConfig() {}
225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // Returns a string containing the URL and port the server is listening to.
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // This URL is directly used by the Web app to request a license, example:
255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // http://localhost:8888/license_server
265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual std::string GetServerURL() = 0;
275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
28a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  // Returns true if it successfully sets the command line to run the license
29a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  // server with needed args and switches.
30a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  virtual bool GetServerCommandLine(base::CommandLine* command_line) = 0;
315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // Returns true if the server is supported on current platform.
335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual bool IsPlatformSupported() = 0;
345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) private:
365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(TestLicenseServerConfig);
375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)};
385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif  // CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_CONFIG_H_
40