Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
drm_listener_samsung.h
Go to the documentation of this file.
1 // Copyright (c) 2016 Samsung Electronics. All rights reserved.
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 PPAPI_CPP_SAMSUNG_DRM_LISTENER_SAMSUNG_H_
6 #define PPAPI_CPP_SAMSUNG_DRM_LISTENER_SAMSUNG_H_
7 
8 #include "ppapi/c/pp_resource.h"
9 #include "ppapi/c/samsung/ppp_media_player_samsung.h"
10 
14 namespace pp {
15 
16 class MediaPlayer_Samsung;
17 
24  public:
25  virtual ~DRMListener_Samsung();
26 
33  virtual void OnInitdataLoaded(
34  PP_MediaPlayerDRMType drm_type,
35  uint32_t init_data_size,
36  const void* init_data);
37 
44  virtual void OnLicenseRequest(uint32_t request_size, const void* request);
45 
46  protected:
50 
52  explicit DRMListener_Samsung(MediaPlayer_Samsung* player);
53 
55  void AttachTo(MediaPlayer_Samsung* player);
56 
57  private:
58  void Detach();
59  PP_Resource player_;
60 
61  // Disallow copy and assign
63  DRMListener_Samsung& operator=(const DRMListener_Samsung&);
64 };
65 
66 } // namespace pp
67 
68 #endif // PPAPI_CPP_SAMSUNG_DRM_LISTENER_SAMSUNG_H_
virtual void OnLicenseRequest(uint32_t request_size, const void *request)
Definition: drm_listener_samsung.h:23
void AttachTo(MediaPlayer_Samsung *player)
Attaches listener to the |player|.
virtual void OnInitdataLoaded(PP_MediaPlayerDRMType drm_type, uint32_t init_data_size, const void *init_data)
Definition: media_player_samsung.h:37