Pepper_42_C++_interfaces
service_list_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_SERVICE_LIST_SAMSUNG_H_
12 #define PPAPI_CPP_SAMSUNG_SERVICE_LIST_SAMSUNG_H_
13 
14 #include "ppapi/c/samsung/ppb_service_list_samsung.h"
15 #include "ppapi/cpp/completion_callback.h"
16 #include "ppapi/cpp/resource.h"
17 #include "ppapi/cpp/samsung/program_schedule_samsung.h"
18 
19 namespace pp {
20 
21 class InstanceHandle;
22 
23 class ServiceListSamsung : public Resource {
24 public:
25  ServiceListSamsung(const InstanceHandle& instance);
26 
28 
30 
32 
34  /**
35  * ListServices() provides list <code>ProgramScheduleSamsung</code>
36  * identifying available Program Schedule Resources for available services.
37  *
38  * @param[in] callback <code>CompletionCallbackWithOutput</code> that will
39  * be run when output will be ready.
40  *
41  * @return <code>PP_OK<code> if succeed. Error from PP_ERROR otherwise.
42  */
44  std::vector<ProgramScheduleSamsung> >& callback);
45 
46  int32_t MonitorScheduleChanges(
47  PPB_ProgramSchedule_Monitoring_Callback callback, void* user_data);
48 
49  /**
50  * FindService() finds first <code>ProgramScheduleSamsung</code> identifying
51  * first Program Schedule Resource fitting criteria.
52  *
53  * @param[in] criteria <code>PP_SearchCriteria</code> for service search.
54  *
55  * @param[in] callback <code>CompletionCallbackWithOutput</code> that will
56  * be run when output will be ready.
57  *
58  * @return <code>PP_OK<code> if succeed. Error from PP_ERROR otherwise.
59  */
60  int32_t FindService(
61  const struct PP_SearchCriteria* criteria,
63 
64  /**
65  * ChangeService() changes current service to one identified by provided
66  * serviceID.
67  *
68  * @param[in] serviceID <code>uint32_t</code> for service identification.
69  *
70  * @param[in] callback <code>CompletionCallback</code> that will
71  * be run when output will be ready.
72  *
73  * @return <code>PP_OK<code> if succeed. Error from PP_ERROR otherwise.
74  */
75  int32_t ChangeService(uint64_t serviceID,
76  const CompletionCallback& callback);
77 };
78 
79 } // namespace pp
80 
81 
82 #endif /* PPAPI_CPP_SAMSUNG_SERVICE_LIST_SAMSUNG_H_ */
int32_t ChangeService(uint64_t serviceID, const CompletionCallback &callback)
int32_t FindService(const struct PP_SearchCriteria *criteria, const CompletionCallbackWithOutput< ProgramScheduleSamsung > &callback)
int32_t ListServices(const CompletionCallbackWithOutput< std::vector< ProgramScheduleSamsung > > &callback)
PassRef
Definition: pass_ref.h:17
int32_t MonitorScheduleChanges(PPB_ProgramSchedule_Monitoring_Callback callback, void *user_data)
A reference counted module resource.
Definition: resource.h:20