Ejemplo n.º 1
0
 public static extern ReturnCode DsmWinNew(
     [In, Out] TWIdentity origin,
     [In, Out] TWIdentity destination,
     DataGroups dg,
     DataArgumentType dat,
     Message msg,
     [In, Out] TWStatusUtf8 data);
Ejemplo n.º 2
0
 /// <summary>
 /// Translate the contents of a TW_STATUS structure received from a Source into a localized UTF-8
 /// encoded string.
 /// </summary>
 /// <param name="status">The status.</param>
 /// <returns></returns>
 public ReturnCode GetSource(TWStatus status, out TWStatusUtf8 utf8status)
 {
     utf8status = new TWStatusUtf8 {
         Status = status
     };
     Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.StatusUtf8, Message.Get);
     return(Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Get, status));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Translate the contents of a TW_STATUS structure received from the manager into a localized UTF-8
 /// encoded string.
 /// </summary>
 /// <param name="status">The status.</param>
 /// <returns></returns>
 public ReturnCode GetManager(TWStatus status, out TWStatusUtf8 utf8status)
 {
     utf8status = new TWStatusUtf8 {
         Status = status
     };
     Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.StatusUtf8, Message.Get);
     return(Dsm.DsmEntry(Session.AppId, null, Message.Get, status));
 }
Ejemplo n.º 4
0
 public static ReturnCode DsmEntry(
     TWIdentity origin,
     TWIdentity destination,
     Message msg,
     TWStatusUtf8 data)
 {
     if (PlatformInfo.Current.IsWindows)
     {
         if (PlatformInfo.Current.UseNewWinDSM)
         {
             return(NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data));
         }
         else
         {
             return(NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data));
         }
     }
     else if (PlatformInfo.Current.IsLinux)
     {
         return(NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data));
     }
     throw new PlatformNotSupportedException();
 }