Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: chromecast/public/cast_sys_info.h

Issue 1092283003: [Chromecast] CastSysInfo implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
gunsch 2015/04/20 18:02:31 while you're here, can you add a chromecast/public
derekjchow1 2015/04/20 21:15:32 Done. It'd be better if we could specify that file
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMECAST_PUBLIC_CAST_SYS_INFO_H_
6 #define CHROMECAST_PUBLIC_CAST_SYS_INFO_H_
7
8 #include <string>
9 #include <vector>
10
11 namespace chromecast {
12
13 // Pure abstract interface for system information which is accessed by other
14 // processes as well as cast_shell browser process. All informations are
halliwell 2015/04/20 18:12:18 I don't think "informations" is a word :)
derekjchow1 2015/04/20 21:15:32 Done.
15 // immutable except FDR count which must be persistent against factory reset.
16 class CastSysInfo {
17 public:
18 enum BuildType {
19 BUILD_ENG,
20 BUILD_BETA,
21 BUILD_PRODUCTION,
22 };
23
24 static CastSysInfo* Create();
byungchul 2015/04/20 18:00:24 scoped_ptr<CastSysInfo>
gunsch 2015/04/20 18:02:31 No. scoped_ptr is a Chromium dependency. Leave as-
byungchul 2015/04/20 18:10:19 Hmm.. Unless we want to make all CastSysInfo in sh
gunsch 2015/04/20 18:11:49 I'm fine if we want to put a convenience function
derekjchow1 2015/04/20 21:15:32 Done. Moved to base/cast_sys_info.h and renamed Cr
25
26 virtual ~CastSysInfo() {}
27
28 virtual void Initialize() = 0;
29 virtual void Finalize() = 0;
halliwell 2015/04/20 18:12:18 What do Initialize/Finalize do? Seems like a hold
derekjchow1 2015/04/20 21:15:32 Our Android code uses it to do some Java initializ
halliwell 2015/04/20 21:19:43 Ok. So what are the rules for client using this c
derekjchow1 2015/04/20 22:10:52 This is only relevant for ATV, but for correctness
halliwell 2015/04/20 22:22:11 Ok, but if that's all there is to it, we could jus
gunsch 2015/04/20 22:34:49 I believe there may actually be more to it. Byungc
byungchul 2015/04/20 23:51:14 When it was instantiated in chromecast service cli
derekjchow1 2015/04/21 21:48:33 Removed.
30
31 // Returns the system build type.
32 virtual BuildType GetBuildType() = 0;
33 // Returns release channel of system.
34 virtual const std::string GetSystemReleaseChannel() = 0;
35 // Returns serial number of the device.
36 virtual const std::string GetSerialNumber() = 0;
37 // Returns product code name of the device (eg: anchovy, salami, fugu, ...).
38 virtual const std::string GetProductName() = 0;
39 // Returns model name of device (eg: Chromecast, Nexus Player, ...).
40 virtual const std::string GetDeviceModel() = 0;
41 // Returns the board's name (eg: bg2proto, eureka-b1, ...).
42 virtual const std::string GetBoardName() = 0;
43 // Returns the revision of board (eg: 514, ...).
44 virtual const std::string GetBoardRevision() = 0;
45 // Returns device manufacturer (eg: Google, Sony, ...).
46 virtual const std::string GetManufacturer() = 0;
47 // Returns the system's build number (eg: 100, 20000 ...).
48 // This describes system version which may be different with
49 // CAST_BUILD_NUMBER.
50 virtual const std::string GetSystemBuildNumber() = 0;
51
52 // Returns default country and locale baked from the factory.
53 virtual const std::string GetFactoryCountry() = 0;
54 virtual const std::string GetFactoryLocale(std::string* second_locale) = 0;
55
56 // Returns the wifi interface.
57 virtual const std::string GetWifiInterface() = 0;
58 // Returns the soft AP interface.
59 virtual const std::string GetApInterface() = 0;
60 };
61
62 } // namespace chromecast
63
64 #endif // CHROMECAST_PUBLIC_CAST_SYS_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698