1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed 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 at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * 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 and
14 * limitations under the License.
15 */
16
17package com.android.tv;
18
19import com.android.tv.analytics.Analytics;
20import com.android.tv.analytics.Tracker;
21import com.android.tv.config.RemoteConfig;
22import com.android.tv.data.ChannelDataManager;
23import com.android.tv.data.PreviewDataManager;
24import com.android.tv.data.ProgramDataManager;
25import com.android.tv.dvr.DvrDataManager;
26import com.android.tv.dvr.DvrManager;
27import com.android.tv.dvr.DvrScheduleManager;
28import com.android.tv.dvr.DvrStorageStatusManager;
29import com.android.tv.dvr.DvrWatchedPositionManager;
30import com.android.tv.dvr.recorder.RecordingScheduler;
31import com.android.tv.perf.PerformanceMonitor;
32import com.android.tv.util.AccountHelper;
33import com.android.tv.util.TvInputManagerHelper;
34
35/**
36 * Interface with getters for application scoped singletons.
37 */
38public interface ApplicationSingletons {
39
40    Analytics getAnalytics();
41
42    ChannelDataManager getChannelDataManager();
43
44    /**
45     * Checks if the {@link ChannelDataManager} instance has been created and all the channels has
46     * been loaded.
47     */
48    boolean isChannelDataManagerLoadFinished();
49
50    ProgramDataManager getProgramDataManager();
51
52    /**
53     * Checks if the {@link ProgramDataManager} instance has been created and the current programs
54     * for all the channels has been loaded.
55     */
56    boolean isProgramDataManagerCurrentProgramsLoadFinished();
57
58    PreviewDataManager getPreviewDataManager();
59
60    DvrDataManager getDvrDataManager();
61
62    DvrStorageStatusManager getDvrStorageStatusManager();
63
64    DvrScheduleManager getDvrScheduleManager();
65
66    DvrManager getDvrManager();
67
68    RecordingScheduler getRecordingScheduler();
69
70    DvrWatchedPositionManager getDvrWatchedPositionManager();
71
72    InputSessionManager getInputSessionManager();
73
74    Tracker getTracker();
75
76    TvInputManagerHelper getTvInputManagerHelper();
77
78    MainActivityWrapper getMainActivityWrapper();
79
80    AccountHelper getAccountHelper();
81
82    RemoteConfig getRemoteConfig();
83
84    boolean isRunningInMainProcess();
85
86    PerformanceMonitor getPerformanceMonitor();
87}
88