blob: 806aea1dd6f118e99783880fd281b143e42d8303 [file] [log] [blame]
aimitakeshi27ed8ad2010-07-29 10:12:27 +09001/*
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
22namespace 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 */
33class DrmInfoStatus {
34public:
35 // Should be in sync with DrmInfoStatus.java
36 static const int STATUS_OK = 1;
37 static const int STATUS_ERROR = 2;
38
39public:
40 /**
41 * Constructor for DrmInfoStatus
42 *
43 * @param[in] _statusCode Status of the communication
44 * @param[in] _drmBuffer Rights information
45 * @param[in] _mimeType MIME type
46 */
47 DrmInfoStatus(int _statusCode, const DrmBuffer* _drmBuffer, const String8& _mimeType);
48
49 /**
50 * Destructor for DrmInfoStatus
51 */
52 virtual ~DrmInfoStatus() {
53
54 }
55
56public:
57 int statusCode;
58 const DrmBuffer* drmBuffer;
59 String8 mimeType;
60};
61
62};
63
64#endif /* __DRM_INFO_STATUS_H__ */
65