Pepper_42_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  * SetRatingLock() sets lock for displaying programs of certain rating.
84  *
85  * @param[in] program <code>PP_RatingInfo</code> from which rating is taken
86  *
87  * @param[in] state <code>PP_Bool</code> of lock to be set.
88  *
89  * @param[in] callback <code>PP_CompletionCallback</code> that will be run
90  * when output will be ready.
91  *
92  * @return <code>PP_Error<code> with error code.
93  */
94  int32_t SetRatingLock(const struct PP_RatingInfo* ratingInfo, PP_Bool setLock,
95  const CompletionCallback& callback);
96  /**
97  * GetRatingLock() gets lock status for displaying programs of certain rating.
98  *
99  * @param[in] program <code>PP_RatingInfo</code> from which rating is taken
100  * to be edited.
101  *
102  * @param[out] state <code>PP_Bool</code> of the lock.
103  *
104  * @param[in] callback <code>PP_CompletionCallback</code> that will be run
105  * when output will be ready.
106  *
107  * @return <code>PP_Error<code> with error code.R
108  */
109  int32_t GetRatingLock(const struct PP_RatingInfo* ratingInfo,
111 };
112 
113 } // namespace pp
114 
115 
116 #endif /* PPAPI_CPP_SAMSUNG_PROGRAM_SCHEDULE_SAMSUNG_H_ */
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