DrmInfoEvent.java revision 27b277779c89251f2aafcc7a56db95d264900c9d
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     * TYPE_RIGHTS_REMOVED, when the rights has been removed.
50     */
51    public static final int TYPE_RIGHTS_REMOVED = 6;
52
53    /**
54     * constructor to create DrmInfoEvent object with given parameters
55     *
56     * @param uniqueId Unique session identifier
57     * @param type Type of information
58     * @param message Message description
59     */
60    public DrmInfoEvent(int uniqueId, int type, String message) {
61        super(uniqueId, type, message);
62    }
63}
64
65