diff options
Diffstat (limited to 'common/include/ivug-drm.h')
-rwxr-xr-x | common/include/ivug-drm.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/common/include/ivug-drm.h b/common/include/ivug-drm.h new file mode 100755 index 0000000..891100c --- /dev/null +++ b/common/include/ivug-drm.h @@ -0,0 +1,92 @@ +/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ +#ifndef __IVUG_DRM_H__ +#define __IVUG_DRM_H__ + +#include <stdbool.h> + +typedef enum IVUG_DRM_SETAS_TYPE +{ + IVUG_DRM_SETAS_NONE = -1, + IVUG_DRM_SETAS_WALLPAPER, + IVUG_DRM_SETAS_CALLERID, +}_ivug_drm_setas_type; + +typedef enum +{ + IVUG_DRM_RESULT_LIMITED = -1, + IVUG_DRM_RESULT_UNLIMITED, + IVUG_DRM_RESULT_COUNT, + IVUG_DRM_RESULT_DATETIME, + IVUG_DRM_RESULT_INTERVAL_DAYS, + IVUG_DRM_RESULT_TIMED_COUNT, + IVUG_DRM_RESULT_ACCUMULATED, + IVUG_DRM_RESULT_INDIVIDUAL, + IVUG_DRM_RESULT_SYSTEM, +}drm_constraints; + +typedef struct +{ + drm_constraints constraints; + int data; +}drm_data_t; + +typedef void *drm_handle_t; + +#ifdef __cplusplus +extern "C" { +#endif + +/* + Check whether @param file_path is DRM or not. +*/ +bool ivug_drm_is_drm_file(const char* file_path); +
+/* + Check RO is valid. + FL case : Always return true(valid RO). +*/ +bool ivug_drm_has_valid_ro(const char *path); + +/* + Retrieving infomation from file +*/ +char* ivug_drm_get_drm_vendor_info(const char *path); +bool ivug_drm_get_forwarding_info(const char *path); + +bool ivug_drm_is_possible_to_setas(const char* path, _ivug_drm_setas_type type); +
+/* + Decrypt DRM file and allocated in memory. + + CAUTION : this functionn read entire file and allocate memory with size of entire file. +*/
+drm_data_t * ivug_drm_check_constraint(const char* path); + +/* return value must be freed */ +char * ivug_drm_get_right_url(const char *path); +char * ivug_drm_get_mime(const char *path); + + + +#ifdef __cplusplus +} +#endif + + +#endif // __IVUG_DRM_H__ + |