1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 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 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 19 #ifndef PVMI_DRM_KVP_H_INCLUDED 20 #define PVMI_DRM_KVP_H_INCLUDED 21 22 #define PVMF_DRM_INFO_IS_PROTECTED_QUERY "drm/is-protected" 23 #define PVMF_DRM_INFO_IS_PROTECTED_VALUE "drm/is-protected;valtype=bool" 24 25 #define PVMF_DRM_INFO_IS_LICENSE_AVAILABLE_QUERY "drm/is-license-available" 26 #define PVMF_DRM_INFO_IS_LICENSE_AVAILABLE_VALUE "drm/is-license-available;valtype=bool" 27 28 #define PVMF_DRM_INFO_IS_FORWARD_LOCKED_QUERY "drm/is-forward-locked" 29 #define PVMF_DRM_INFO_IS_FORWARD_LOCKED_VALUE "drm/is-forward-locked;valtype=bool" 30 31 #define PVMF_DRM_INFO_CAN_USE_AS_RINGTONE_QUERY "drm/can-use-as-ringtone" 32 #define PVMF_DRM_INFO_CAN_USE_AS_RINGTONE_VALUE "drm/can-use-as-ringtone;valtype=bool" 33 34 /* 35 * License types fall into following categories: 36 * - time based (has an start and end time) 37 * - duration based (a certain amount of time since first use) 38 * - count based 39 * - or a combination of both 40 * Value returned by this query would be a string that will take any of 41 * the following forms: 42 * "unlimited", "time", "duration", "count", "time-count", "duration-count" 43 */ 44 #define PVMF_DRM_INFO_LICENSE_TYPE_QUERY "drm/license-type" 45 #define PVMF_DRM_INFO_LICENSE_TYPE_VALUE "drm/license-type;valtype=char*" 46 47 /* 48 * Value returned is uint32 49 */ 50 #define PVMF_DRM_INFO_LICENSE_COUNT_QUERY "drm/num-counts" 51 #define PVMF_DRM_INFO_LICENSE_COUNT_VALUE "drm/num-counts;valtype=uint32" 52 53 /* 54 * All start and end times are in ISO 8601 Timeformat 55 * The format is as follows. Exactly the components shown here must be present, 56 * with exactly this punctuation. Note that the "T" appears literally in the string. 57 * to indicate the beginning of the time element, as specified in ISO 8601. 58 * Year: 59 * YYYY (eg 1997) 60 * Year and month: 61 * YYYY-MM (eg 1997-07) 62 * Complete date: 63 * YYYY-MM-DD (eg 1997-07-16) 64 * Complete date plus hours and minutes: 65 * YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00) 66 * Complete date plus hours, minutes and seconds: 67 * YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00) 68 * Complete date plus hours, minutes, seconds and a decimal fraction of a 69 * second 70 * YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00) 71 * where: 72 * YYYY = four-digit year 73 * MM = two-digit month (01=January, etc.) 74 * DD = two-digit day of month (01 through 31) 75 * hh = two digits of hour (00 through 23) (am/pm NOT allowed) 76 * mm = two digits of minute (00 through 59) 77 * ss = two digits of second (00 through 59) 78 * s = one or more digits representing a decimal fraction of a second 79 * TZD = time zone designator (Z or +hh:mm or -hh:mm) 80 * 81 * This profile defines two ways of handling time zone offsets: 82 * - Times are expressed in UTC (Coordinated Universal Time), 83 * with a special UTC designator ("Z"). 84 * 85 * - Times are expressed in local time, together with a time zone offset 86 * in hours and minutes. A time zone offset of "+hh:mm" indicates that 87 * the date/time uses a local time zone which is "hh" hours and "mm" 88 * minutes ahead of UTC. A time zone offset of "-hh:mm" indicates that 89 * the date/time uses a local time zone which is "hh" hours and "mm" 90 * minutes behind UTC. 91 * 92 * For example: 93 * 1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, 94 * US Eastern Standard Time. 95 * 1994-11-05T13:15:30Z corresponds to the same instant. 96 */ 97 98 /* 99 * StartTime in ISO 8601 format. If the start time is not set then the value 100 * would be "now" 101 */ 102 #define PVMF_DRM_INFO_LICENSE_START_TIME_QUERY "drm/license-start" 103 #define PVMF_DRM_INFO_LICENSE_START_TIME_VALUE "drm/license-start;valtype=char*" 104 105 /* 106 * Expiration Time in ISO 8601 format. If no end time then this query would not be 107 * answered. 108 */ 109 #define PVMF_DRM_INFO_LICENSE_EXPIRATION_TIME_QUERY "drm/license-expiry" 110 #define PVMF_DRM_INFO_LICENSE_EXPIRATION_TIME_VALUE "drm/license-expiry;valtype=char*" 111 112 /* 113 * StartTime in Microsoft's FILETIME format (number of 100s of nanoseconds since 114 * Jan 1, 1601) 115 */ 116 #define PVMF_DRM_INFO_LICENSE_START_TIME_VALUE_FORMAT_MS_FILETIME "drm/license-start;valtype=pUnit64_value;format=ms-filetime" 117 118 /* 119 * Expiration Time in Microsoft's FILETIME format (number of 100s of nanoseconds since 120 * Jan 1, 1601) 121 */ 122 #define PVMF_DRM_INFO_LICENSE_EXPIRATION_TIME_VALUE_FORMAT_MS_FILETIME "drm/license-expiry;valtype=pUnit64_value;format=ms-filetime" 123 124 /* 125 * License duration since first use. Duration is specified in number of seconds. 126 */ 127 #define PVMF_DRM_INFO_LICENSE_DURATION_SINCE_FIRST_USE_QUERY "drm/duration" 128 #define PVMF_DRM_INFO_LICENSE_DURATION_SINCE_FIRST_USE_VALUE "drm/duration;valtype=uint32" 129 130 /* 131 * License issuer 132 */ 133 #define PVMF_DRM_INFO_LICENSE_ISSUER_QUERY "dla/license-issuer" 134 #define PVMF_DRM_INFO_LICENSE_ISSUER_VALUE "dla/license-issuer;valtype=char*" 135 136 /* 137 * Redirect times 138 */ 139 #define PVMF_DRM_INFO_REDIRECT_TIMES_QUERY "dla/num-redirect" 140 #define PVMF_DRM_INFO_REDIRECT_TIMES_VALUE "dla/num-redirect;valtype=uint32" 141 142 /* 143 * Opaque data for enveloped content 144 */ 145 #define PVMF_DRM_INFO_ENVELOPE_DATA_SIZE_QUERY "drm/envelope-data-size" 146 #define PVMF_DRM_INFO_ENVELOPE_DATA_SIZE_VALUE "drm/envelope-data-size;valtype=uint32" 147 #define PVMF_DRM_INFO_ENVELOPE_DATA_QUERY "drm/envelope-data" 148 #define PVMF_DRM_INFO_ENVELOPE_DATA_VALUE "drm/envelope-data;valtype=uint8*" 149 150 #endif // PVMI_DRM_KVP_H_INCLUDED 151 152 153 154 155