summaryrefslogtreecommitdiffstats
path: root/chromecast/base/cast_sys_info_android.h
blob: 0cc4b55ea04a3202232ddedcd0fb085f314dc182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_
#define CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_

#include <jni.h>

#include "base/macros.h"
#include "chromecast/public/cast_sys_info.h"

namespace base {
namespace android {
class BuildInfo;
}
}

namespace chromecast {

class CastSysInfoAndroid : public CastSysInfo {
 public:
  static bool RegisterJni(JNIEnv* env);

  CastSysInfoAndroid();
  ~CastSysInfoAndroid() override;

  // CastSysInfo implementation:
  BuildType GetBuildType() override;
  std::string GetSerialNumber() override;
  std::string GetProductName() override;
  std::string GetDeviceModel() override;
  std::string GetManufacturer() override;
  std::string GetSystemBuildNumber() override;
  std::string GetSystemReleaseChannel() override;
  std::string GetBoardName() override;
  std::string GetBoardRevision() override;
  std::string GetFactoryCountry() override;
  std::string GetFactoryLocale(std::string* second_locale) override;
  std::string GetWifiInterface() override;
  std::string GetApInterface() override;
  std::string GetGlVendor() override;
  std::string GetGlRenderer() override;
  std::string GetGlVersion() override;

  // Native implementation of Java methods.
  void DeviceNameChanged(JNIEnv* env, jobject obj, jstring device_name);

 private:
  const base::android::BuildInfo* const build_info_;

  DISALLOW_COPY_AND_ASSIGN(CastSysInfoAndroid);
};

}  // namespace chromecast

#endif  // CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_