+++ /dev/null
-PROJ_DIR=$(shell pwd)
-SRCS=\
- src/Interop/Interop.Libteec.cs \
- src/Interop/Interop.Types.cs \
- src/Interop/Interop.Libraries.cs \
- src/Interop/Interop.Errors.cs \
- src/Secure/Libteec.cs \
- src/Secure/Properties/AssemblyInfo.cs \
- Test.cs
-
-test.exe: ${SRCS}
- mcs ${SRCS} -out:test.exe
-
-.PHONY: build
-build: test.exe
-
-.PHONY: build-csuml
-build-csuml:
- (cd ~/csapi/csuml && dotnet restore && dotnet build)
-
-pack: ${SRCS}
- zip -r csapi-libteec.zip src
-
-csapi-libteec.puml: build-csuml ${SRCS}
- @echo "create csapi-libteec.puml"
- (cd ~/csapi/csuml && dotnet run -- ${PROJ_DIR}/filelist.lst) > csapi-libteec.puml
-
-csapi-libteec.png: csapi-libteec.puml
- java -jar ~/bin/plantuml.jar csapi-libteec.puml
-
-
-# .phony is a target that is not a real file
-.PHONY: diagram diagram-show
-diagram: csapi-libteec.png
-diagram-show: diagram
- xdg-open csapi-libteec.png
-
-xbuild-hello:
- xbuild /p:Configuration=Release HelloWorld.csproj
-
+++ /dev/null
-using System;
-using System.Runtime.InteropServices;
-using System.Threading;
-using System.Threading.Tasks;
-
-using Tizen.Security.TEEC;
-
-class Test {
- static void Main() {
- Guid ta_uuid = new Guid();
- Context ctx = new Context(null);
- Session ses = null;
-
- ctx.OpenSession(ta_uuid);
- ses.Close();
-
- CancellationTokenSource token = new CancellationTokenSource();
- Task<Session> ses_task = ctx.OpenSessionAsync(ta_uuid, token.Token);
- ses = ses_task.Result;
- ses.Close();
-
- IntPtr buf = Marshal.AllocHGlobal(20*1024);
- SharedMemory shm = ctx.RegisterSharedMemory(buf, 20*1024, SharedMemoryFlags.Input|SharedMemoryFlags.Output);
- ctx.ReleaseSharedMemory(shm);
- Marshal.FreeHGlobal(buf);
-
- shm = ctx.AllocateSharedMemory(10*1024, SharedMemoryFlags.Input);
- ctx.ReleaseSharedMemory(shm);
- }
-}