DrmInfoEvent.java revision dc549d60f98d809f626c99de614960409a847054
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 would be passed to caller in
21 * {@link DrmManagerClient.OnInfoListener#onInfo(DrmManagerClient, DrmInfoEvent)}
22 *
23 */
24public class DrmInfoEvent extends DrmEvent {
25    /**
26     * TYPE_ALREADY_REGISTERED_BY_ANOTHER_ACCOUNT, when registration has been already done
27     * by another account ID.
28     */
29    public static final int TYPE_ALREADY_REGISTERED_BY_ANOTHER_ACCOUNT = 1;
30    /**
31     * TYPE_REMOVE_RIGHTS, when the rights needs to be removed completely.
32     */
33    public static final int TYPE_REMOVE_RIGHTS = 2;
34    /**
35     * TYPE_RIGHTS_INSTALLED, when the rights are downloaded and installed ok.
36     */
37    public static final int TYPE_RIGHTS_INSTALLED = 3;
38    /**
39     * TYPE_WAIT_FOR_RIGHTS, rights object is on it's way to phone,
40     * wait before calling checkRights again.
41     */
42    public static final int TYPE_WAIT_FOR_RIGHTS = 4;
43    /**
44     * TYPE_ACCOUNT_ALREADY_REGISTERED, when registration has been
45     * already done for the given account.
46     */
47    public static final int TYPE_ACCOUNT_ALREADY_REGISTERED = 5;
48
49    /**
50     * constructor to create DrmInfoEvent object with given parameters
51     *
52     * @param uniqueId Unique session identifier
53     * @param type Type of information
54     * @param message Message description
55     */
56    public DrmInfoEvent(int uniqueId, int type, String message) {
57        super(uniqueId, type, message);
58    }
59}
60
61