コード例 #1
0
        public ByteArray GetPrompt()
        {
            ByteArray prompt = new ByteArray();

            SertaintyCore.uxpch_getPrompt(_handle, prompt);
            return(prompt);
        }
コード例 #2
0
        public byte[] GetBytes(int len)
        {
            IntPtr ptr = SertaintyCore.uxpba_getData(_handle);

            if (ptr == IntPtr.Zero)
            {
                return(new byte[0]);
            }
            if (len == 0)
            {
                return(new byte[0]);
            }
            byte[] array = new byte[len];
            Marshal.Copy(ptr, array, 0, len);
            return(array);
        }
コード例 #3
0
        public override string ToString()
        {
            IntPtr ptr = SertaintyCore.uxpba_getData(_handle);

            if (ptr == IntPtr.Zero)
            {
                return("");
            }
            int len = 0;

            while (Marshal.ReadByte(ptr, len) != 0)
            {
                len++;
            }
            if (len == 0)
            {
                return("");
            }
            byte[] array = new byte[len];
            Marshal.Copy(ptr, array, 0, len);

            return(Encoding.UTF8.GetString(array));
        }
コード例 #4
0
 public void EndTimer()
 {
     SertaintyCore.uxpch_endTimer(_handle);
 }
コード例 #5
0
 public void Clear()
 {
     SertaintyCore.uxpba_clearData(_handle);
 }
コード例 #6
0
 public ByteArray()
 {
     _handle = SertaintyCore.uxpba_newHandle();
 }
コード例 #7
0
 public static void PublishIdToFile(Sertainty.CallStatus status, string id, string doc, long mods)
 {
     SertaintyCore.uxpid_publishToFile(status, id, doc, mods);
 }
コード例 #8
0
 public long Read(ByteArray buffer, long max_size)
 {
     return(SertaintyCore.uxpfile_readVirtualFile(_uxp, this, buffer, max_size));
 }
コード例 #9
0
 public void SetValue(string value)
 {
     SertaintyCore.uxpch_setValueString(_handle, value);
 }
コード例 #10
0
 public void Close()
 {
     SertaintyCore.uxpfile_close(_handle);
 }
コード例 #11
0
 public bool CompareExternalFle(string vf_name, string ext_file_name)
 {
     return(SertaintyCore.uxpfile_compareExternalFile(_handle, vf_name, ext_file_name));
 }
コード例 #12
0
 public static void SetLogFile(string prefix, string version)
 {
     SertaintyCore.uxpsys_setLogFile(prefix, version);
 }
コード例 #13
0
 public void AddVirtualFile(string virName, string filespec, long pageSize, long cacheSize, long mods)
 {
     SertaintyCore.uxpfile_addVirtualFromFile(_handle, virName, filespec, pageSize, cacheSize, mods);
 }
コード例 #14
0
 public void OpenNewFile(string data, string governance, long govtype, long mods, long flags)
 {
     SertaintyCore.uxpfile_openNewFile(_handle, data, governance, govtype, mods, flags);
 }
コード例 #15
0
 public UxpFile()
 {
     _handle = SertaintyCore.uxpfile_newHandle();
 }
コード例 #16
0
 public static IntPtr GetErrorMessage(IntPtr handle)
 {
     return(SertaintyCore.uxpsys_getErrorMessage(handle));
 }
コード例 #17
0
 public static long InitializeLibrary(ByteArray buffer, long argc, string[] argv, string licenseFile, string appKey, string prefix, string version)
 {
     return(SertaintyCore.uxpsys_initLibrary(buffer, argc, argv, licenseFile, appKey, prefix, version));
 }
コード例 #18
0
 public void Open(string source, Mode mode)
 {
     SertaintyCore.uxpfile_openFile(_handle, source, mode);
 }
コード例 #19
0
 public VirtualFile(UxpFile uxp, string fileSpec, Mode mode)
 {
     _uxp    = uxp;
     _handle = SertaintyCore.uxpfile_openVirtualFile(uxp, fileSpec, mode);
 }
コード例 #20
0
 public AuthorizationStatus Authenticate()
 {
     return(SertaintyCore.uxpfile_authenticate(_handle));
 }
コード例 #21
0
 public void Close()
 {
     SertaintyCore.uxpfile_closeVirtualFile(_uxp, this);
 }
コード例 #22
0
        public Challenge GetChallenge(int ch_idx)
        {
            IntPtr ch_handle = SertaintyCore.uxpfile_getChallenge(_handle, ch_idx);

            return(Challenge.FromHandle(ch_handle));
        }
コード例 #23
0
 public CallStatus()
 {
     _handle = SertaintyCore.uxpsys_newCallStatusHandle();
 }
コード例 #24
0
 public void AddResponse(Challenge ch)
 {
     SertaintyCore.uxpfile_addResponse(_handle, ch);
 }
コード例 #25
0
 public static bool HasError(IntPtr handle)
 {
     return(SertaintyCore.uxpsys_hasError(handle));
 }
コード例 #26
0
 public static void FileReadAll(CallStatus status, string filespec, ByteArray outbuf)
 {
     SertaintyCore.uxpsys_fileReadAll(status, filespec, outbuf);
 }
コード例 #27
0
 public void StartTimer()
 {
     SertaintyCore.uxpch_startTimer(_handle);
 }
コード例 #28
0
 public void SetData(string data)
 {
     SertaintyCore.uxpba_setData(_handle, data, data.Length);
 }