DrmInfoStatus.java revision c7b3ccc564448cb4b918728421f9402bc18278c5
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 17package android.drm; 18 19/** 20 * This is an entity class which wraps the result of communication between device 21 * and online DRM server. 22 * 23 * As a result of {@link DrmManagerClient#processDrmInfo(DrmInfo)} an instance of DrmInfoStatus 24 * would be returned. This class holds {@link ProcessedData}, which could be used to instantiate 25 * {@link DrmRights#DrmRights(ProcessedData, String)} in license acquisition. 26 * 27 */ 28public class DrmInfoStatus { 29 // Should be in sync with DrmInfoStatus.cpp 30 public static final int STATUS_OK = 1; 31 public static final int STATUS_ERROR = 2; 32 33 public final int statusCode; 34 public final int infoType; 35 public final String mimeType; 36 public final ProcessedData data; 37 38 /** 39 * constructor to create DrmInfoStatus object with given parameters 40 * 41 * @param _statusCode Status of the communication 42 * @param _infoType Type of the DRM information processed 43 * @param _data The processed data 44 * @param _mimeType MIME type 45 */ 46 public DrmInfoStatus(int _statusCode, int _infoType, ProcessedData _data, String _mimeType) { 47 statusCode = _statusCode; 48 infoType = _infoType; 49 data = _data; 50 mimeType = _mimeType; 51 } 52} 53 54