--- /dev/null
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+namespace Tizen.Internals.Errors
+{
+ public enum ErrorCode : int
+ {
+ None = 0, // 0, /**< Successful */
+ NotPermitted = -1, // -EPERM, /**< Operation not permitted */
+ NoSuchFile = -2, // -ENOENT, /**< No such file or directory */
+ NoSuchProcess = -3, // -ESRCH, /**< No such process */
+ InterruptedSysCall = -4, // -EINTR, /**< Interrupted system call */
+ IoError = -5, // -EIO, /**< I/O error */
+ NoSuchDevice = -6, // -ENXIO, /**< No such device or address */
+ ArgumentListTooLong = -7, // -E2BIG, /**< Argument list too long */
+ ExecFormatError = -8, // -ENOEXEC, /**< Exec format error */
+ BadFileNumber = -9, // -EBADF, /**< Bad file number */
+ TryAgain = -11, // -EAGAIN, /**< Try again */
+ OutOfMemory = -12, // -ENOMEM, /**< Out of memory */
+ PermissionDenied = -13, // -EACCES, /**< Permission denied */
+ BadAddress = -14, // -EFAULT, /**< Bad address */
+ BlockDeviceRequired = -15, // -ENOTBLK, /**< Block device required */
+ ResourceBusy = -16, // -EBUSY, /**< Device or resource busy */
+ FileExists = -17, // -EEXIST, /**< File exists */
+ CrossDeviceLink = -18, // -EXDEV, /**< Cross-device link */
+ NotaDirectory = -20, // -ENOTDIR, /**< Not a directory */
+ IsADirectory = -21, // -EISDIR, /**< Is a directory */
+ InvalidParameter = -22, // -EINVAL, /**< Invalid function parameter */
+ FileTableOverflow = -23, // -ENFILE, /**< File table overflow */
+ TooManyOpenFiles = -24, // -EMFILE, /**< Too many open files */
+ TooNotaTerminal = -25, // -ENOTTY, /**< Not a terminal */
+ TooTextFileBusy = -26, // -ETXTBSY, /**< Not a terminal */
+ FileTooLarge = -27, // -EFBIG, /**< File too large */
+ FileNoSpaceOnDevice = -28, // -ENOSPC, /**< No space left on device */
+ IllegalSeek = -29, // -ESPIPE, /**< Illegal seek */
+ ReadOnlyFilesystem = -30, // -EROFS, /**< Read-only file system */
+ NoData = -61, // -ENODATA, /**< No data available */
+ TooManyLinks = -31, // -EMLINK, /**< Too many links */
+ BrokenPipe = -32, // -EPIPE, /**< Broken pipe */
+ ArgumentOutOfDomain = -33, // -EDOM, /**< Math argument out of domain of func */
+ ResultOutOfRange = -34, // -ERANGE, /**< Math result not representable */
+ WouldCauseDeadlock = -35, // -EDEADLK, /**< Resource deadlock would occur */
+ FileNameTooLong = -36, // -ENAMETOOLONG,/**< File name too long */
+ FileNoLocksAvailable = -37, // -ENOLCK, /**< No record locks available */
+ InvalidOperation = -38, // -ENOSYS, /**< Function not implemented */
+ DirNotEmpty = -39, // -ENOTEMPTY, /**< Directory not empty */
+ TooManySymbolicLinks = -40, // -ELOOP, /**< Too many symbolic links encountered */
+ WouldBlock = -11, // TryAgain (-EAGAIN), /**< Operation would block */
+ CorruptedSharedLib = -80, // -ELIBBAD, /**< Accessing a corrupted shared library */
+ LibSectionCorrupted = -81, // -ELIBSCN, /**< .lib section in a.out corrupted */
+ LinkTooManySharedLib = -82, // -ELIBMAX, /**< Attempting to link in too many shared libraries */
+ SharedLibExec = -83, // -ELIBEXEC, /**< Cannot exec a shared library directly */
+ IllegalByteSeq = -84, // -EILSEQ, /**< Illegal byte sequence */
+ SystemCallRestart = -85, // -ERESTART, /**< Interrupted system call should be restarted */
+ StreamsPipe = -86, // -ESTRPIPE, /**< Streams pipe error */
+ TooManyUsers = -87, // -EUSERS, /**< Too many users */
+ NonSocket = -88, // -ENOTSOCK, /**< Socket operation on non-socket */
+ NoDestAddress = -89, // -EDESTADDRREQ, /**< Destination address required */
+ MsgTooLong = -90, // -EMSGSIZE, /**< Message too long */
+ ProtocolWrongType = -91, // -EPROTOTYPE, /**< Protocol wrong type for socket */
+ ProtocolNotAvaliable = -92, // -ENOPROTOOPT, /**< Protocol not available */
+ ProtocolNotSupported = -93, // -EPROTONOSUPPORT, /**< Protocol not supported */
+ SocketTypeNotSupported = -94, // -ESOCKTNOSUPPORT, /**< Socket type not supported */
+ EndpointOperatinNotSupported = -95, // -EOPNOTSUPP, /**< Operation not supported on transport endpoint */
+ ProtocolFamilyNotSupported = -96, // -EPFNOSUPPORT, /**< Protocol family not supported */
+ AddressFamilyNotSupported = -97, // -EAFNOSUPPORT, /**< Address family not supported by protocol */
+ AddresInUse = -98, // -EADDRINUSE, /**< Address already in use */
+ CannotAssignAddress = -99, // -EADDRNOTAVAIL, /**< Cannot assign requested address */
+ Networkdown = -100, // -ENETDOWN, /**< Network is down */
+ NetworkUnreachable = -101, // -ENETUNREACH, /**< Network is unreachable */
+ NetworkReset = -102, // -ENETRESET, /**< Network dropped connection because of reset */
+ ConnectionAborted = -103, // -ECONNABORTED, /**< Software caused connection abort */
+ ConnectionResetByPeer = -104, // -ECONNRESET, /**< Connection reset by peer */
+ BufferSpace = -105, // -ENOBUFS, /**< No buffer space available */
+ EndpointConnected = -106, // -EISCONN, /**< Transport endpoint is already connected */
+ EndpointNotConnected = -107, // -ENOTCONN, /**< Transport endpoint is not connected */
+ EndpointShutdown = -108, // -ESHUTDOWN, /**< Cannot send after transport endpoint shutdown */
+ TooManyReferences = -109, // -ETOOMANYREFS, /**< Too many references: cannot splice */
+ ConnectionTimeout = -110, // -ETIMEDOUT, /**< Connection timed out */
+ ConnectionRefused = -111, // -ECONNREFUSED, /**< Connection refused */
+ Hostdown = -112, // -EHOSTDOWN, /**< Host is down */
+ NoRouteToHost = -113, // -EHOSTUNREACH, /**< No route to host */
+ AlreadyInProgress = -114, // -EALREADY, /**< Operation already in progress */
+ NowInProgress = -115, // -EINPROGRESS, /**< Operation now in progress */
+ StaleNfsFileHandle = -116, // -ESTALE, /**< Stale NFS file handle */
+ StructureUnclean = -117, // -EUCLEAN, /**< Structure needs cleaning */
+ NotXenixNamedTypeFile = -118, // -ENOTNAM, /**< Not a XENIX named type file */
+ NoXenixSemaphoresAvailable = -119, // -ENAVAIL, /**< No XENIX semaphores available */
+ IsNamedTypeFile = -120, // -EISNAM, /**< Is a named type file */
+ RemoteIo = -121, // -EREMOTEIO, /**< Remote I/O error */
+ QuotaExceeded = -122, // -EDQUOT, /**< Quota exceeded */
+ NoMedium = -123, // -ENOMEDIUM, /**< No medium found */
+ WrongMediumType = -124, // -EMEDIUMTYPE, /**< Wrong medium type */
+ Canceled = -125, // -ECANCELED, /**< Operation Canceled */
+ KeyNotAvailable = -126, // -ENOKEY, /**< Required key not available */
+ KeyExpired = -127, // -EKEYEXPIRED, /**< Key has expired */
+ KeyRevoked = -128, // -EKEYREVOKED, /**< Key has been revoked */
+ KeyRejected = -129, // -EKEYREJECTED, /**< Key was rejected by service */
+
+ OwnerDead = -130, // -EOWNERDEAD, /**< Owner died (for robust mutexes) */
+
+ Unknown = -1073741824, // TIZEN_ERROR_MIN_PLATFORM_ERROR, /**< Unknown error */
+
+ TimedOut, // /**< Time out */
+ NotSupported, // /**< Not Supported */
+ UserNotConsented,// /**< Not Consented */
+ EndofCollection //
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Tizen.Internals</RootNamespace>
+ <AssemblyName>Tizen.Internals</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>Tizen.Internals.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Interop\Interop.CommonError.cs" />
+ <Compile Include="Tizen.Internals.Errors\ErrorFacts.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Tizen.Internals.Errors\ErrorCode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Tizen.Internals.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
%define dllpath %{_libdir}/mono/tizen
-%define dllname Tizen.dll
Name: csapi-tizen
Summary: Tizen API for C#
Source1: %{name}.manifest
Source2: %{name}.pc.in
-# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
BuildRequires: mono-compiler
BuildRequires: mono-devel
-# TODO: replace mono-core to gacutil.
-# mono-core should provide the symbol 'gacutil'
-Requires(post): mono-core
-Requires(postun): mono-core
-
-# P/Invoke Dependencies
BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(capi-base-common)
-# P/Invoke Runtime Dependencies
-# TODO: It should be removed after fix tizen-rpm-config
Requires: dlog
-# DLL Dependencies
-#BuildRequires: ...
+Requires: capi-base-common
+
+Requires(post): mono-core
+Requires(postun): mono-core
%description
Tizen API for C#
cp %{SOURCE1} .
%build
-# build dll
-mcs -target:library -out:%{dllname} -keyfile:Tizen/Tizen.snk \
- Tizen/Properties/AssemblyInfo.cs \
- Tizen/Tizen/*.cs \
- Tizen/Interop/*.cs
-
-# check p/invoke
-if [ -x %{dllname} ]; then
- RET=`mono-shlib-cop %{dllname}`; \
- CNT=`echo $RET | grep -E "^error:" | wc -l`; \
- if [ $CNT -gt 0 ]; then exit 1; fi
-fi
+make
%install
# copy dll
mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+install -p -m 644 Tizen.dll %{buildroot}%{dllpath}
+install -p -m 644 Tizen.Internals.dll %{buildroot}%{dllpath}
# generate pkgconfig
mkdir -p %{buildroot}%{_libdir}/pkgconfig
sed -e "s#@version@#%{version}#g" \
-e "s#@dllpath@#%{dllpath}#g" \
- -e "s#@dllname@#%{dllname}#g" \
%{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
%post
-gacutil -i %{dllpath}/%{dllname}
+gacutil -i %{dllpath}/Tizen.dll
+gacutil -i %{dllpath}/Tizen.Internals.dll
%files
-%{dllpath}/%{dllname}
+%{dllpath}/Tizen.dll
+%{dllpath}/Tizen.Internals.dll
%files devel
%{_libdir}/pkgconfig/%{name}.pc