blob: 679e48df99905568ffc0c2a65472e2eb45a68c81 [file] [log] [blame]
aimitakeshid074e302010-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_CONVERTED_STATUS_H__
18#define __DRM_CONVERTED_STATUS_H__
19
20#include "drm_framework_common.h"
21
22namespace android {
23
24/**
25 * This is an utility class which wraps the status of the conversion, the converted
26 * data/checksum data and the offset. Offset is going to be used in the case of close
27 * session where the agent will inform where the header and body signature should be added
28 *
29 * As a result of DrmManagerClient::convertData(int, const DrmBuffer*) and
30 * DrmManagerClient::closeConvertSession(int) an instance of DrmConvertedStatus
31 * would be returned.
32 *
33 */
34class DrmConvertedStatus {
35public:
36 // Should be in sync with DrmConvertedStatus.java
37 static const int STATUS_OK = 1;
38 static const int STATUS_INPUTDATA_ERROR = 2;
39 static const int STATUS_ERROR = 3;
40
41public:
42 /**
43 * Constructor for DrmConvertedStatus
44 *
45 * @param[in] _statusCode Status of the conversion
46 * @param[in] _convertedData Converted data/checksum data
47 * @param[in] _offset Offset value
48 */
49 DrmConvertedStatus(int _statusCode, const DrmBuffer* _convertedData, int _offset);
50
51 /**
52 * Destructor for DrmConvertedStatus
53 */
54 virtual ~DrmConvertedStatus() {
55
56 }
57
58public:
59 int statusCode;
60 const DrmBuffer* convertedData;
61 int offset;
62};
63
64};
65
66#endif /* __DRM_CONVERTED_STATUS_H__ */
67