Home | History | Annotate | Download | only in libsecurepath
      1 /*
      2  * Copyright (C) 2012 Samsung Electronics Co., LTD
      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 
     17 #ifndef TLWVDRM_API_H_
     18 #define TLWVDRM_API_H_
     19 
     20 #include "tci.h"
     21 
     22 /**
     23  * Command ID's for communication Trustlet Connector -> Trustlet.
     24  */
     25 #define CMD_WV_DRM_ENABLE_PATH_PROTECTION	0x00010000
     26 #define CMD_WV_DRM_DISABLE_PATH_PROTECTION	0x00010001
     27 
     28 
     29 /**
     30  * Return codes
     31  */
     32 #define RET_TL_WV_DRM_OK 0x00000000
     33 
     34 /**
     35  * Error codes
     36  */
     37 #define RET_ERR_WV_DRM_PROTECT_CONTENT_PATH_INIT 0x00001000
     38 #define RET_ERR_WV_DRM_PROTECT_CONTENT_PATH_TERM 0x00001001
     39 
     40 
     41 /**
     42  * Maximum data length.
     43  */
     44 #define MAX_DATA_LEN 512
     45 
     46 /**
     47  * TCI message data.
     48  */
     49 
     50 typedef struct {
     51 	uint32_t id;
     52 	uint32_t data_len;
     53 	uint8_t	*data_ptr;
     54 	uint8_t	data[MAX_DATA_LEN];
     55 } tci_cmd_t;
     56 
     57 typedef struct {
     58 	uint32_t id;
     59 	uint32_t return_code;
     60 	uint32_t data_len;
     61 	uint8_t	*data_ptr;
     62 	uint8_t	data[MAX_DATA_LEN];
     63 } tci_resp_t;
     64 
     65 typedef struct {
     66 	union {
     67 		tci_cmd_t cmd;	/**< Command message structure */
     68 		tci_resp_t resp;	/**< Response message structure */
     69 	};
     70 } tciMessage_t;
     71 
     72 /**
     73  * Trustlet UUID.
     74  */
     75 #define TL_WV_DRM_UUID { { 0, 6, 3, 8, 6, 5, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0 } }
     76 
     77 #endif /* TLWVDRM_API_H_ */
     78