• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 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 
17 #ifndef __DRM_INFO_STATUS_H__
18 #define __DRM_INFO_STATUS_H__
19 
20 #include "drm_framework_common.h"
21 
22 namespace android {
23 
24 /**
25  * This is an utility class which wraps the result of communication between device
26  * and online DRM server.
27  *
28  * As a result of DrmManagerClient::processDrmInfo(const DrmInfo*) an instance of
29  * DrmInfoStatus would be returned. This class holds DrmBuffer which could be
30  * used to instantiate DrmRights in license acquisition.
31  *
32  */
33 class DrmInfoStatus {
34 public:
35     // Should be in sync with DrmInfoStatus.java
36     static const int STATUS_OK = 1;
37     static const int STATUS_ERROR = 2;
38 
39 public:
40     /**
41      * Constructor for DrmInfoStatus
42      *
43      * @param[in] _statusCode Status of the communication
44      * @param[in] _infoType Type of the DRM information processed
45      * @param[in] _drmBuffer Rights information
46      * @param[in] _mimeType MIME type
47      */
48     DrmInfoStatus(int _statusCode, int _infoType, const DrmBuffer* _drmBuffer, const String8& _mimeType);
49 
50     /**
51      * Destructor for DrmInfoStatus
52      */
~DrmInfoStatus()53     virtual ~DrmInfoStatus() {
54 
55     }
56 
57 public:
58     int statusCode;
59     int infoType;
60     const DrmBuffer* drmBuffer;
61     String8 mimeType;
62 };
63 
64 };
65 
66 #endif /* __DRM_INFO_STATUS_H__ */
67 
68