DrmInfoEvent.java revision 0e092f806b0a4b81785a52da8ba22d2d47087de5
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 19import java.util.HashMap; 20 21/** 22 * An entity class that is passed to the 23 * {@link DrmManagerClient.OnInfoListener#onInfo onInfo()} callback. 24 * 25 */ 26public class DrmInfoEvent extends DrmEvent { 27 /** 28 * The registration has already been done by another account ID. 29 */ 30 public static final int TYPE_ALREADY_REGISTERED_BY_ANOTHER_ACCOUNT = 1; 31 /** 32 * The rights need to be removed completely. 33 */ 34 public static final int TYPE_REMOVE_RIGHTS = 2; 35 /** 36 * The rights have been successfully downloaded and installed. 37 */ 38 public static final int TYPE_RIGHTS_INSTALLED = 3; 39 /** 40 * The rights object is being delivered to the device. You must wait before 41 * calling {@link DrmManagerClient#acquireRights acquireRights()} again. 42 */ 43 public static final int TYPE_WAIT_FOR_RIGHTS = 4; 44 /** 45 * The registration has already been done for the given account. 46 */ 47 public static final int TYPE_ACCOUNT_ALREADY_REGISTERED = 5; 48 /** 49 * The rights have been removed. 50 */ 51 public static final int TYPE_RIGHTS_REMOVED = 6; 52 53 /** 54 * Creates a <code>DrmInfoEvent</code> object with the specified parameters. 55 * 56 * @param uniqueId Unique session identifier. 57 * @param type Type of the event. Could be any of the event types defined above. 58 * @param message Message description. 59 */ 60 public DrmInfoEvent(int uniqueId, int type, String message) { 61 super(uniqueId, type, message); 62 } 63 64 /** 65 * Creates a <code>DrmInfoEvent</code> object with the specified parameters. 66 * 67 * @param uniqueId Unique session identifier. 68 * @param type Type of the event. Could be any of the event types defined above. 69 * @param message Message description. 70 * @param attributes Attributes for extensible information. Could be any 71 * information provided by the plug-in. 72 */ 73 public DrmInfoEvent(int uniqueId, int type, String message, 74 HashMap<String, Object> attributes) { 75 super(uniqueId, type, message, attributes); 76 } 77} 78 79