Pepper_37_C++_interfaces
program_schedule_samsung.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics, Visual Display Division.
3  * All Rights Reserved.
4  *
5  * @author Mikolaj Kamionka <m.kamionka@samsung.com>
6  *
7  * Use of this source code is governed by a BSD-style license that can be
8  * found in the Chromium-LICENSE file.
9  */
10 
11 #ifndef PPAPI_CPP_SAMSUNG_PROGRAM_SCHEDULE_SAMSUNG_H_
12 #define PPAPI_CPP_SAMSUNG_PROGRAM_SCHEDULE_SAMSUNG_H_
13 
14 #include "ppapi/c/pp_time.h"
15 #include "ppapi/c/samsung/ppb_program_schedule_samsung.h"
16 #include "ppapi/cpp/completion_callback.h"
17 #include "ppapi/cpp/resource.h"
18 #include "ppapi/cpp/var.h"
19 
20 namespace pp {
21 
22 class InstanceHandle;
23 
25 public:
26 
28 
30 
32 
34  /**
35  * GetID() provides ID of service identified by resource.
36  *
37  * @return <code>uint64_t<code> with ID of service.
38  */
39  uint64_t GetID();
40  /**
41  * GetName() providing name of service identified by resource.
42  *
43  * @return <code>PP_Var<code> of type string, with name of service.
44  */
45  Var GetName();
46  /**
47  * GetType() providing type of service identified by resource.
48  *
49  * @return <code>PP_ServiceType<code> with type of service. More information
50  * in pp_epg_event.h.
51  */
52  PP_ServiceType GetType();
53  /**
54  * GetScheduledEvents() providing array of EPG events from scheduled table
55  * for service associated whit program schedule resource.
56  *
57  * @param[in] start_time <code>PP_Time</code> with beginning of
58  * requested schedule.
59  *
60  * @param[in] end_time <code>PP_Time</code> with end of requested schedule.
61  *
62  * @param[in] callback <code>CompletionCallbackWithOutput</code> that will
63  * be run when output will be ready.
64  *
65  * @return <code>PP_Error<code> with error code.
66  */
67  int32_t GetScheduledEvents(PP_Time start_time, PP_Time end_time,
68  const CompletionCallbackWithOutput< std::vector<PP_EPGEvent> >&
69  callback);
70  /**
71  * GetPresentFollowing() providing array of EPG events from present/following
72  * table for service associated with program schedule resource.
73  *
74  * @param[in] callback <code>CompletionCallbackWithOutput</code> that will
75  * be run when output will be ready.
76  *
77  * @return <code>PP_Error<code> with error code.
78  */
79  int32_t GetPresentFollowing(
80  const CompletionCallbackWithOutput< std::vector<PP_EPGEvent> >&
81  callback);
82  /**
83  * GetProgramGenre() gets genre of certain program from the service
84  * associated with program schedule resource.
85  *
86  * @param[in] event <code>PP_EPGEvent</code> to get genre of event.
87  *
88  * @param[in] callback <code>CompletionCallbackWithOutput</code> that will
89  * be run when output will be ready.
90  *
91  * @return <code>PP_Error<code> with error code.
92  */
93  int32_t GetProgramGenre(const struct PP_EPGEvent* event,
95  /**
96  * SetRatingLock() sets lock for displaying programs of certain rating.
97  *
98  * @param[in] program <code>PP_RatingInfo</code> from which rating is taken
99  *
100  * @param[in] state <code>PP_Bool</code> of lock to be set.
101  *
102  * @param[in] callback <code>PP_CompletionCallback</code> that will be run
103  * when output will be ready.
104  *
105  * @return <code>PP_Error<code> with error code.
106  */
107  int32_t SetRatingLock(const struct PP_RatingInfo* ratingInfo, PP_Bool setLock,
108  const CompletionCallback& callback);
109  /**
110  * GetRatingLock() gets lock status for displaying programs of certain rating.
111  *
112  * @param[in] program <code>PP_RatingInfo</code> from which rating is taken
113  * to be edited.
114  *
115  * @param[out] state <code>PP_Bool</code> of the lock.
116  *
117  * @param[in] callback <code>PP_CompletionCallback</code> that will be run
118  * when output will be ready.
119  *
120  * @return <code>PP_Error<code> with error code.R
121  */
122  int32_t GetRatingLock(const struct PP_RatingInfo* ratingInfo,
124 };
125 
126 } // namespace pp
127 
128 
129 #endif /* PPAPI_CPP_SAMSUNG_PROGRAM_SCHEDULE_SAMSUNG_H_ */
int32_t GetProgramGenre(const struct PP_EPGEvent *event, const CompletionCallbackWithOutput< PP_ProgramGenre > &callback)
PP_ServiceType GetType()
int32_t GetScheduledEvents(PP_Time start_time, PP_Time end_time, const CompletionCallbackWithOutput< std::vector< PP_EPGEvent > > &callback)
PassRef
Definition: pass_ref.h:17
int32_t GetPresentFollowing(const CompletionCallbackWithOutput< std::vector< PP_EPGEvent > > &callback)
int32_t SetRatingLock(const struct PP_RatingInfo *ratingInfo, PP_Bool setLock, const CompletionCallback &callback)
A generic type used for passing data types between the module and the page.
Definition: var.h:21
int32_t GetRatingLock(const struct PP_RatingInfo *ratingInfo, const CompletionCallbackWithOutput< PP_Bool > &callback)
A reference counted module resource.
Definition: resource.h:20