summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:55:22 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:55:22 +0900
commite675124bd769a90a8fde6f46c66595947b7206d4 (patch)
tree7b1d03ca46495da482c251663d2c9ea05803c668
parent50ad81fa8a274cd3b9d50027625c191b13cb9700 (diff)
downloaddrm-service-core-intel-tizen_2.0.tar.gz
drm-service-core-intel-tizen_2.0.tar.bz2
drm-service-core-intel-tizen_2.0.zip
-rwxr-xr-xCMakeLists.txt20
-rwxr-xr-xLICENSE.Flora206
-rwxr-xr-xNOTICE6
-rwxr-xr-xdrm-service-core-intel.pc.in9
-rwxr-xr-xinclude/CPointerArray.h52
-rwxr-xr-xinclude/CXMLAttribute.h36
-rwxr-xr-xinclude/CXMLElement.h56
-rwxr-xr-xinclude/CXMLFile.h52
-rwxr-xr-xinclude/InkaTypes.h55
-rwxr-xr-xinclude/IntelDrm_Core.h43
-rwxr-xr-xinclude/drm-intel-crypto-util.h11
-rwxr-xr-xinclude/drm-intel-util.h71
-rwxr-xr-xinclude/drm-oem-intel.h171
-rw-r--r--lib/arm/libdrm-service-core-intel.so.0.0.9bin0 -> 48244 bytes
-rw-r--r--lib/arm/libdrm-service-core-intel.so.0.1.0bin0 -> 48244 bytes
-rw-r--r--lib/ix86/libdrm-service-core-intel.so.0.0.9bin0 -> 62032 bytes
-rw-r--r--lib/ix86/libdrm-service-core-intel.so.0.1.0bin0 -> 62032 bytes
-rw-r--r--packaging/drm-service-core-intel.spec64
18 files changed, 852 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755
index 0000000..431b4b3
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,20 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+SET (this_target drm-intel)
+
+CONFIGURE_FILE(drm-service-core-intel.pc.in ${CMAKE_SOURCE_DIR}/drm-service-core-intel.pc @ONLY)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/drm-service-core-intel.pc DESTINATION lib/pkgconfig)
+
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/${this_target} FILES_MATCHING PATTERN "*.h")
+
+IF("${ARCH}" MATCHES "arm")
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/arm/ DESTINATION lib FILES_MATCHING PATTERN "*"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+ GROUP_EXECUTE GROUP_READ
+ WORLD_EXECUTE WORLD_READ)
+ELSE("${ARCH}" MATCHES "arm")
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/ix86/ DESTINATION lib FILES_MATCHING PATTERN "*"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+ GROUP_EXECUTE GROUP_READ
+ WORLD_EXECUTE WORLD_READ)
+ENDIF("${ARCH}" MATCHES "arm")
diff --git a/LICENSE.Flora b/LICENSE.Flora
new file mode 100755
index 0000000..adaea36
--- /dev/null
+++ b/LICENSE.Flora
@@ -0,0 +1,206 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://floralicense.org/license/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and
+all other entities that control, are controlled by, or are
+under common control with that entity. For the purposes of
+this definition, "control" means (i) the power, direct or indirect,
+to cause the direction or management of such entity,
+whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
+or more of the outstanding shares, or (iii) beneficial ownership of
+such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice
+that is included in or attached to the work (an example is provided
+in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from,
+or merely link (or bind by name) to the interfaces of, the Work and
+Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor
+for inclusion in the Work by the copyright owner or by an individual or
+Legal Entity authorized to submit on behalf of the copyright owner.
+For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or
+its representatives, including but not limited to communication on
+electronic mailing lists, source code control systems, and issue
+tracking systems that are managed by, or on behalf of, the Licensor
+for the purpose of discussing and improving the Work, but excluding
+communication that is conspicuously marked or otherwise designated
+in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies
+with the standards set forth in the Compatibility Definition Document
+and passes the Compatibility Test Suite as defined from time to time
+by the Tizen Technical Steering Group and certified by the Tizen
+Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work
+solely as incorporated into a Tizen Certified Platform, where such
+license applies only to those patent claims licensable by such
+Contributor that are necessarily infringed by their Contribution(s)
+alone or by combination of their Contribution(s) with the Work solely
+as incorporated into a Tizen Certified Platform to which such
+Contribution(s) was submitted. If You institute patent litigation
+against any entity (including a cross-claim or counterclaim
+in a lawsuit) alleging that the Work or a Contribution incorporated
+within the Work constitutes direct or contributory patent infringement,
+then any patent licenses granted to You under this License for that
+Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof pursuant to the copyright license
+above, in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works
+ a copy of this License; and
+ 2. You must cause any modified files to carry prominent notices stating
+ that You changed the files; and
+ 3. You must retain, in the Source form of any Derivative Works that
+ You distribute, all copyright, patent, trademark, and attribution
+ notices from the Source form of the Work, excluding those notices
+ that do not pertain to any part of the Derivative Works; and
+ 4. If the Work includes a "NOTICE" text file as part of its distribution,
+ then any Derivative Works that You distribute must include a readable
+ copy of the attribution notices contained within such NOTICE file,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works, in at least one of the following places:
+ within a NOTICE text file distributed as part of the Derivative Works;
+ within the Source form or documentation, if provided along with the
+ Derivative Works; or, within a display generated by the Derivative Works,
+ if and wherever such third-party notices normally appear.
+ The contents of the NOTICE file are for informational purposes only
+ and do not modify the License.
+
+You may add Your own attribution notices within Derivative Works
+that You distribute, alongside or as an addendum to the NOTICE text
+from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License. You may add Your own
+copyright statement to Your modifications and may provide additional or
+different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works
+as a whole, provided Your use, reproduction, and distribution of
+the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "[]"
+replaced with your own identifying information. (Don't include
+the brackets!) The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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://floralicense.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.
+
diff --git a/NOTICE b/NOTICE
new file mode 100755
index 0000000..73f2b52
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,6 @@
+Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Flora License, Version 1.
+Please, see the LICENSE.Flora file for Flora License, Version 1 terms and conditions.
+
+libdrm-service-core-intel.so file is licensed under Flora License, Version 1.
+Please, see the LICENSE.Flora file for Flora License, Version 1 terms and conditions.
diff --git a/drm-service-core-intel.pc.in b/drm-service-core-intel.pc.in
new file mode 100755
index 0000000..2389f61
--- /dev/null
+++ b/drm-service-core-intel.pc.in
@@ -0,0 +1,9 @@
+libdir=/usr/lib
+includedir=/usr/include/drm-intel
+
+Name: drm-service-core-intel
+Description: DRM package for Tizen store
+Version: @VERSION@
+Requires: openssl
+Libs: -L${libdir} -ldrm-service-core-intel
+Cflags: -I${includedir}
diff --git a/include/CPointerArray.h b/include/CPointerArray.h
new file mode 100755
index 0000000..3e30e79
--- /dev/null
+++ b/include/CPointerArray.h
@@ -0,0 +1,52 @@
+
+/********************************************************************************
+* Copyright ? 2004-2009 by INKA Entworks, Inc (www.inka.co.kr). *
+* All rights reserved. *
+* *
+* No parts of this source code may be in any way copied, reproduced, modified *
+* or distributed without the prior written consent of INKA Entworks, Inc. *
+* CPointerArray.h: interface for the CPointerArray class. *
+*********************************************************************************/
+
+#ifndef __CPOINTERARRAY_H__
+#define __CPOINTERARRAY_H__
+
+
+#if !defined(AFX_CPOINTERARRAY_H__AB67E4BE_A233_4E3E_B257_9830D90326EE__INCLUDED_)
+#define AFX_CPOINTERARRAY_H__AB67E4BE_A233_4E3E_B257_9830D90326EE__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+//#include "Shp.h"
+#include "InkaTypes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+class CPointerArray
+{
+protected:
+ LPVOID* m_ppData;
+ int m_nMaxSize;
+ int m_nNumOfData;
+
+public:
+ CPointerArray();
+ virtual ~CPointerArray();
+
+ int Add( LPVOID pData );
+ int Remove( int nIndex );
+ LPVOID Get( int nIndex );
+ inline int GetCount() { return m_nNumOfData; }
+ inline void RemoveAll() { m_nNumOfData = 0; }
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif // !defined(AFX_CPOINTERARRAY_H__AB67E4BE_A233_4E3E_B257_9830D90326EE__INCLUDED_)
+#endif /* __CPOINTERARRAY_H__ */
diff --git a/include/CXMLAttribute.h b/include/CXMLAttribute.h
new file mode 100755
index 0000000..8821fe2
--- /dev/null
+++ b/include/CXMLAttribute.h
@@ -0,0 +1,36 @@
+
+/********************************************************************************
+* Copyright ? 2004-2009 by INKA Entworks, Inc (www.inka.co.kr). *
+* All rights reserved. *
+* *
+* No parts of this source code may be in any way copied, reproduced, modified *
+* or distributed without the prior written consent of INKA Entworks, Inc. *
+* CXMLAttribute.h: interface for the CXMLAttribute class. *
+*********************************************************************************/
+#include "InkaTypes.h"
+
+#if !defined(AFX_CXMLATTRIBUTE_H__2B925786_3613_47B0_B85D_CAF2053F46DB__INCLUDED_)
+#define AFX_CXMLATTRIBUTE_H__2B925786_3613_47B0_B85D_CAF2053F46DB__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+class CXMLAttribute
+{
+protected:
+ LPTSTR m_pszName;
+ LPTSTR m_pszValue;
+
+public:
+ CXMLAttribute();
+ virtual ~CXMLAttribute();
+
+ int SetName( LPCTSTR pszName );
+ int SetValue( LPCTSTR pszValue );
+
+ inline LPCTSTR GetName() { return m_pszName; }
+ inline LPCTSTR GetValue() { return m_pszValue; }
+};
+
+#endif // !defined(AFX_CXMLATTRIBUTE_H__2B925786_3613_47B0_B85D_CAF2053F46DB__INCLUDED_)
diff --git a/include/CXMLElement.h b/include/CXMLElement.h
new file mode 100755
index 0000000..057485a
--- /dev/null
+++ b/include/CXMLElement.h
@@ -0,0 +1,56 @@
+
+/********************************************************************************
+* Copyright ? 2004-2009 by INKA Entworks, Inc (www.inka.co.kr). *
+* All rights reserved. *
+* *
+* No parts of this source code may be in any way copied, reproduced, modified *
+* or distributed without the prior written consent of INKA Entworks, Inc. *
+* CXMLElement.h: interface for the CXMLElement class. *
+*********************************************************************************/
+
+#if !defined(AFX_CXMLELEMENT_H__B6A6A39B_1980_4A4F_B68B_E87B53A3EE9B__INCLUDED_)
+#define AFX_CXMLELEMENT_H__B6A6A39B_1980_4A4F_B68B_E87B53A3EE9B__INCLUDED_
+
+#include "InkaTypes.h"
+#include "CXMLAttribute.h"
+#include "CPointerArray.h"
+
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+class CXMLElement
+{
+protected:
+ LPTSTR m_pszName;
+ LPTSTR m_pszValue;
+
+ CPointerArray m_pChilds;
+ CPointerArray m_pAttributes;
+
+ int _SearchNodes( CPointerArray* ppaChildNodes, CXMLElement* pCurrent, LPCTSTR pszTagName, va_list args );
+
+public:
+ CXMLElement();
+ virtual ~CXMLElement();
+
+ int SetName( LPCTSTR pszName );
+ int SetValue( LPCTSTR pszValue );
+ int AddAttribute( LPCTSTR pszName, LPCTSTR pszValue );
+
+ inline LPCTSTR GetName() { return m_pszName; }
+ inline LPCTSTR GetValue() { return m_pszValue; }
+
+ int AddChild( CXMLElement* pChild );
+ LPCTSTR GetAttribute( LPCTSTR pszName );
+
+ inline int GetChildCount() { return m_pChilds.GetCount(); }
+ inline int GetAttributeCount() { return m_pAttributes.GetCount(); }
+ inline CXMLElement* GetChild( int nIndex ) { return (CXMLElement*)m_pChilds.Get( nIndex ); }
+ inline CXMLAttribute* GetAttribute( int nIndex ) { return (CXMLAttribute*)m_pAttributes.Get( nIndex ); }
+
+ int Find( CPointerArray* pSearchedChild, LPCTSTR pszChildName, ... );
+};
+
+#endif // !defined(AFX_CXMLELEMENT_H__B6A6A39B_1980_4A4F_B68B_E87B53A3EE9B__INCLUDED_)
diff --git a/include/CXMLFile.h b/include/CXMLFile.h
new file mode 100755
index 0000000..eb910ad
--- /dev/null
+++ b/include/CXMLFile.h
@@ -0,0 +1,52 @@
+/********************************************************************************
+* Copyright ? 2004-2009 by INKA Entworks, Inc (www.inka.co.kr). *
+* All rights reserved. *
+* *
+* No parts of this source code may be in any way copied, reproduced, modified *
+* or distributed without the prior written consent of INKA Entworks, Inc. *
+* CXMLFile.h: interface for the CXMLFile class. *
+*********************************************************************************/
+
+#if !defined(AFX_CXMLFILE_H__21F76587_B9C8_4407_9C16_186F3D47ADE1__INCLUDED_)
+#define AFX_CXMLFILE_H__21F76587_B9C8_4407_9C16_186F3D47ADE1__INCLUDED_
+
+#include "InkaTypes.h"
+#include "CXMLElement.h"
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#ifndef IN
+ #define IN
+#endif
+
+#ifndef OUT
+ #define OUT
+#endif
+
+#define ELEMENT_QUEUE_MAX 2048
+class CXMLFile
+{
+protected:
+ LPCTSTR m_pszXML;
+ CXMLElement* m_paElementQueue[ ELEMENT_QUEUE_MAX ];
+ int m_nQueueIndex;
+ CXMLElement* m_pRoot;
+
+ int _Parse();
+ int _GetElementName( LPTSTR pszElementName );
+ CXMLElement* _Pop();
+ int _Push( CXMLElement* p );
+ int _GetAttributeNameAndValue( LPTSTR pszName, LPTSTR pszValue );
+
+public:
+ CXMLFile();
+ virtual ~CXMLFile();
+
+ int LoadFromStream( LPCTSTR pszXML );
+ int LoadFromFile( LPCTSTR pszFileName );
+ inline CXMLElement* GetRoot() { return m_pRoot; }
+};
+
+#endif // !defined(AFX_CXMLFILE_H__21F76587_B9C8_4407_9C16_186F3D47ADE1__INCLUDED_)
diff --git a/include/InkaTypes.h b/include/InkaTypes.h
new file mode 100755
index 0000000..52e340c
--- /dev/null
+++ b/include/InkaTypes.h
@@ -0,0 +1,55 @@
+/**
+ * @file InkaTypes.h
+ * @brief This file includes definitions of constants,
+ * enumerations, and datastructures for DRM service.
+# @author sunggun.jung(sunggun.jung@samsung.com)
+ * @version 1.0
+ */
+
+#ifndef INKA_DRM_TYPES_H
+#define INKA_DRM_TYPES_H
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#define _T
+#define IF_ERROR_GOTO( error ) if( FAILED( HRESULT_FROM_WIN32( error ) ) ) { nResult = ERRORMSG( error, NULL ); goto finish; }
+#define IF_TRUE_GOTO( cond, error ) if( cond ) { nResult = -1; goto finish; }
+
+#if defined(_WIN32) || defined(_WIN64)
+ #define snprintf _snprintf
+ #define vsnprintf _vsnprintf
+ #define strcasecmp _stricmp
+ #define strncasecmp _strnicmp
+#endif
+
+#ifndef _SHP_SIMUL
+typedef void* LPVOID;
+typedef const char* LPCTSTR;
+typedef unsigned char* LPBYTE;
+typedef char TCHAR;
+typedef char* LPTSTR;
+typedef LPTSTR LPSTR;
+typedef LPCTSTR LPCTSTR;
+typedef LPCTSTR LPCSTR;
+
+#define DWORD unsigned long
+#define LPBYTE unsigned char*
+#define BYTE unsigned char
+#define UINT unsigned int
+#define ULONG unsigned long
+#define INT32 long
+#define INT64 long long
+#define TRUE 1
+#define FALSE 0
+
+typedef char CHAR;
+typedef bool BOOL;
+
+#define ERROR_INVALID_DATA 13L
+#define ERROR_INSUFFICIENT_BUFFER 122L // dderror
+//#define CopyMemory AcMemcpy
+#define INVALID_HOBJ NULL
+
+#endif
+#endif //INKA_DRM_TYPES_H
diff --git a/include/IntelDrm_Core.h b/include/IntelDrm_Core.h
new file mode 100755
index 0000000..86a88cc
--- /dev/null
+++ b/include/IntelDrm_Core.h
@@ -0,0 +1,43 @@
+typedef struct t_cek
+{
+ char *CID;
+ char *CEK;
+ char *EncryptionMethod;
+}T_CEK;
+
+typedef struct t_dro
+{
+ char *CID;
+ char *deviceId;
+ char *digestValue;
+ char *signedValue;
+ char *cert;
+ int Count;
+ char *CreatedTimestamp;
+ char *ExpiredTimeStamp;
+ char *ExpirationDate;
+}T_DRO;
+
+typedef struct t_dcf_file_header
+{
+ unsigned char Version;
+ unsigned char ContentTypeLen;
+ unsigned char ContentURILen;
+ char *ContentType;
+ char *ContentURI;
+ unsigned int HeadersLen;
+ unsigned int DataLen;
+ char *Headers;
+ unsigned int DataOffset;
+}T_DCF_FILE_HEADER;
+
+// DRO Value size
+#define APPID_SIZE 16
+#define CEK_SIZE 512
+#define ENCRYPTION_METHOD_SIZE 512
+#define DEVICEID_SIZE 256
+#define TIMESTAMP_SIZE 256
+#define DIGESTVALUE_SIZE 256
+#define SIGNATUREVALUE_SIZE 1024
+#define CERT_SIZE 1024 * 4
+#define AES_BLOCK_SIZE 16
diff --git a/include/drm-intel-crypto-util.h b/include/drm-intel-crypto-util.h
new file mode 100755
index 0000000..c4509d7
--- /dev/null
+++ b/include/drm-intel-crypto-util.h
@@ -0,0 +1,11 @@
+#include "InkaTypes.h"
+#include "stdlib.h"
+#include "string.h"
+#include "stdio.h"
+
+#define AES_BLOCK_SIZE 16
+
+LPSTR Base64Encode(LPBYTE pbData, int nLength);
+LPBYTE Base64Decode(LPCSTR pszString, int* pnLength);
+
+int decrypt_block(unsigned char *iv, unsigned char *cipherText, int cipherTextLen, unsigned char *cek, int cekLen, unsigned char *plainText);
diff --git a/include/drm-intel-util.h b/include/drm-intel-util.h
new file mode 100755
index 0000000..43d35d1
--- /dev/null
+++ b/include/drm-intel-util.h
@@ -0,0 +1,71 @@
+#include "CPointerArray.h"
+#include "CXMLAttribute.h"
+#include "CXMLElement.h"
+#include "CXMLFile.h"
+#include "InkaTypes.h"
+#include "IntelDrm_Core.h"
+#include "drm-intel-crypto-util.h"
+
+#include "stdlib.h"
+#include "string.h"
+#include "stdio.h"
+
+/**
+ * An application can parse CEK XML Foramt.
+ *
+ * @param[in] pszXML Data String of the CEK information
+ * @param[out] t_cek parsing result to be saved
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int parse_intel_cek(const char* pszXML, T_CEK* t_cek);
+
+/**
+ * An application can parse DRO XML Foramt.
+ *
+ * @param[in] pszXML Data String of the DRO information
+ * @param[out] t_cek parsing result to be saved
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int parse_intel_dro(const char* pszXML, T_DRO* t_RO);
+
+int parse_intel_dro2(const char* pszXML, T_DRO* t_RO);
+
+int parse_intel_dro3(const char* pszXML, T_DRO* t_RO);
+
+/**
+ * An application can parse stored dro.
+ *
+ * @param[in] pFilepath file path of the internal dro
+ * @param[out] t_ro parsing result to be saved
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int get_internal_dro(char *pFilepath, T_DRO* t_ro);
+
+/**
+ * An application can parse stored cek.
+ *
+ * @param[in] pFilepath file path of the internal cek
+ * @param[out] t_cek parsing result to be saved
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int get_internal_cek(char *pFilepath, T_CEK* t_cek);
+
+int delete_internal_cek(char *pAppId);
+
+int get_dcf_header_info(char *pFilePath, T_DCF_FILE_HEADER *pTdcfHeader);
+
+bool get_Uintvar(unsigned int *nValue, FILE *pFile);
+
+int decrypt_package(char *pDcfPath, char *pDecryptedFilePath, unsigned char *pCEK, int cekLen, T_DCF_FILE_HEADER *t_dcf_header);
diff --git a/include/drm-oem-intel.h b/include/drm-oem-intel.h
new file mode 100755
index 0000000..6087cd3
--- /dev/null
+++ b/include/drm-oem-intel.h
@@ -0,0 +1,171 @@
+/*
+ * drm-service-core-intel
+ *
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Sunggun Jung <sunggun.jung@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/**
+* @internal
+* @defgroup DRM-INTEL drm-intel
+* @{
+*/
+#include "drm-intel-util.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/**
+ * An application can install Intel DRM license(DRO).
+ *
+ * @param[in] pDroXML Data String of the Rights Request
+ * @param[in] droBufLen pDroXML Length
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_install_license(char *pDroXML, int droBufLen);
+
+/**
+ * An application can uninstall Intel DRM license(DRO).
+ *
+ * @param[in] pAppId App-id of the rigths which want to un-install
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_uninstall_license(char *pAppId);
+
+/**
+ * An application can install CEK(Contents Encryption Key).
+ *
+ * @param[in] pCekXML Data String of the Rights Request
+ * @param[in] cekBufLen pDroXML Length
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_install_cek(char *pCekXML, int cekBufLen);
+
+/**
+ * An application can get decrypted contents(Apps) which is encrypted
+ *
+ * @param[in] pDcfPath Intel DRM Package File Path
+ * @param[in] pDecryptedFile Decrypted File Path
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_decrypt_package(char *pDcfPath, char *pDecryptedFile);
+
+/**
+ * An application can get informations of rights (DRO).
+ *
+ * @param[in] pAppId App-id of the rights which want to know
+ * @param[out] pDro The rights information about the app-id
+ * @return This function can return any of the following codes
+ * DRM_INTEL_SUCCESS = 0 <success
+ * DRM_INTEL_LIC_VALID = 1 <License is valid
+ * DRM_INTEL_LIC_SUSPEND = 2 <License is valid but for future use
+ * DRM_INTEL_INVALID_ARG = -1000 <invalid argument
+ * DRM_INTEL_PARSING_ERROR = -999 <parsing contents or rights error
+ * DRM_INTEL_DB_ERROR = -998 <data base error
+ * DRM_INTEL_INSUFFICIENT_MEMORY = -997 <memory error
+ * DRM_INTEL_INTERNAL_ERROR = -996 <processing error
+ * DRM_INTEL_FILE_ERROR = -995 <file error
+ * DRM_INTEL_LIC_EXPIRED_DATETIME = -994 <Datetime License is expired
+ * DRM_INTEL_LIC_EXPIRED_COUNT = -993 <Count License is expired
+ * DRM_INTEL_LIC_NO_LICENCE = -992 <No License
+ * DRM_INTEL_LIC_IMEI_MISMATCH = -991 <IMEI is mismatching
+ * DRM_INTEL_LIC_PNUM_MISMATCH = -990 <PNUM is mismatching
+ * DRM_INTEL_UNKNOWN_ERROR = -1 <dummy error value
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_getLicenseInfo(char *pAppId, T_DRO *pDro);
+
+/**
+ * An application can get informations of rights (DRO).
+ *
+ * @param[in] pAppId App-id of the rights which want to know
+ * @return This function can return any of the following codes
+ * DRM_INTEL_SUCCESS = 0 <success
+ * DRM_INTEL_LIC_VALID = 1 <License is valid
+ * DRM_INTEL_LIC_SUSPEND = 2 <License is valid but for future use
+ * DRM_INTEL_INVALID_ARG = -1000 <invalid argument
+ * DRM_INTEL_PARSING_ERROR = -999 <parsing contents or rights error
+ * DRM_INTEL_DB_ERROR = -998 <data base error
+ * DRM_INTEL_INSUFFICIENT_MEMORY = -997 <memory error
+ * DRM_INTEL_INTERNAL_ERROR = -996 <processing error
+ * DRM_INTEL_FILE_ERROR = -995 <file error
+ * DRM_INTEL_LIC_EXPIRED_DATETIME = -994 <Datetime License is expired
+ * DRM_INTEL_LIC_EXPIRED_COUNT = -993 <Count License is expired
+ * DRM_INTEL_LIC_NO_LICENCE = -992 <No License
+ * DRM_INTEL_LIC_IMEI_MISMATCH = -991 <IMEI is mismatching
+ * DRM_INTEL_LIC_PNUM_MISMATCH = -990 <PNUM is mismatching
+ * DRM_INTEL_UNKNOWN_ERROR = -1 <dummy error value
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_consume_license(char *pAppID);
+
+/**
+ * An application can veify the app's rights.
+ *
+ * @param[in] pAppId App-id of the rights which want to know
+ * @return This function can return any of the following codes
+ * DRM_INTEL_SUCCESS = 0 <success
+ * DRM_INTEL_LIC_VALID = 1 <License is valid
+ * DRM_INTEL_LIC_SUSPEND = 2 <License is valid but for future use
+ * DRM_INTEL_INVALID_ARG = -1000 <invalid argument
+ * DRM_INTEL_PARSING_ERROR = -999 <parsing contents or rights error
+ * DRM_INTEL_DB_ERROR = -998 <data base error
+ * DRM_INTEL_INSUFFICIENT_MEMORY = -997 <memory error
+ * DRM_INTEL_INTERNAL_ERROR = -996 <processing error
+ * DRM_INTEL_FILE_ERROR = -995 <file error
+ * DRM_INTEL_LIC_EXPIRED_DATETIME = -994 <Datetime License is expired
+ * DRM_INTEL_LIC_EXPIRED_COUNT = -993 <Count License is expired
+ * DRM_INTEL_LIC_NO_LICENCE = -992 <No License
+ * DRM_INTEL_LIC_IMEI_MISMATCH = -991 <IMEI is mismatching
+ * DRM_INTEL_LIC_PNUM_MISMATCH = -990 <PNUM is mismatching
+ * DRM_INTEL_UNKNOWN_ERROR = -1 <dummy error value
+
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_has_valid_license(char *pAppID);
+
+/**
+ * An application can check the file is drm enabled or not
+ *
+ * @param[in] pDcfPath The file path which want to check
+ * @return This function returns 1 on success or 0 on failure.
+ * @remarks
+ * @see
+ * @since
+ */
+int drm_oem_intel_isDrmFile(char *pDcfPath);
diff --git a/lib/arm/libdrm-service-core-intel.so.0.0.9 b/lib/arm/libdrm-service-core-intel.so.0.0.9
new file mode 100644
index 0000000..2b45d04
--- /dev/null
+++ b/lib/arm/libdrm-service-core-intel.so.0.0.9
Binary files differ
diff --git a/lib/arm/libdrm-service-core-intel.so.0.1.0 b/lib/arm/libdrm-service-core-intel.so.0.1.0
new file mode 100644
index 0000000..95912e7
--- /dev/null
+++ b/lib/arm/libdrm-service-core-intel.so.0.1.0
Binary files differ
diff --git a/lib/ix86/libdrm-service-core-intel.so.0.0.9 b/lib/ix86/libdrm-service-core-intel.so.0.0.9
new file mode 100644
index 0000000..73efa6a
--- /dev/null
+++ b/lib/ix86/libdrm-service-core-intel.so.0.0.9
Binary files differ
diff --git a/lib/ix86/libdrm-service-core-intel.so.0.1.0 b/lib/ix86/libdrm-service-core-intel.so.0.1.0
new file mode 100644
index 0000000..d8a452e
--- /dev/null
+++ b/lib/ix86/libdrm-service-core-intel.so.0.1.0
Binary files differ
diff --git a/packaging/drm-service-core-intel.spec b/packaging/drm-service-core-intel.spec
new file mode 100644
index 0000000..ca1b623
--- /dev/null
+++ b/packaging/drm-service-core-intel.spec
@@ -0,0 +1,64 @@
+Name: drm-service-core-intel
+Summary: The plugin library for installing drm-service-core-intel.so
+Version: 0.1.0
+Release: 0
+Group: TO_BE/FILLED_IN
+License: Flora
+Source0: %{name}-%{version}.tar.gz
+BuildRequires: cmake
+
+Provides: libdrm-service-core-intel.so.0
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+The plugin library for installing drm-service-core-intel.so
+
+%package devel
+Summary: The plugin library for drm-service-core-intel(Development)
+Group: TO_BE/FILLED_IN
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The plugin library for installing drm-service-core-intel.so and header files.
+
+%prep
+%setup -q
+
+%build
+%ifarch %{arm}
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=arm
+%else
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=ix86
+%endif
+make
+#make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+
+%make_install
+
+%post
+/bin/rm -f /etc/ld.so.cache
+/sbin/ldconfig
+
+mkdir -p /opt/var/drm/inteldrm
+chown 0:5000 /opt/var/drm/inteldrm
+chmod 775 /opt/var/drm/inteldrm
+
+ln -s -f %{_libdir}/libdrm-service-core-intel.so.0.1.0 %{_libdir}/libdrm-service-core-intel.so.0
+ln -s -f %{_libdir}/libdrm-service-core-intel.so.0 %{_libdir}/libdrm-service-core-intel.so
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libdrm-service-core-intel.so*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/drm-intel/*.h
+%{_libdir}/pkgconfig/drm-service-core-intel.pc
+