| 
									
										
										
										
											2014-04-17 19:11:11 -04:00
										 |  |  |  | using NTwain.Data; | 
					
						
							|  |  |  |  | using System; | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace NTwain.Triplets | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     /// <summary> | 
					
						
							|  |  |  |  |     /// Contains the full TWAIN entry signatures through pinvoke. | 
					
						
							|  |  |  |  |     /// These are called by all the defined triplets methods in  | 
					
						
							|  |  |  |  |     /// this namespace. | 
					
						
							|  |  |  |  |     /// </summary> | 
					
						
							|  |  |  |  |     static partial class Dsm | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         #region wrapped calls | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             DataGroups dg, | 
					
						
							|  |  |  |  |             DataArgumentType dat, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             ref IntPtr data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, dg, dat, msg, ref data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, dg, dat, msg, ref data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             DataGroups dg, | 
					
						
							|  |  |  |  |             DataArgumentType dat, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             ref DataGroups data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, dg, dat, msg, ref data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, dg, dat, msg, ref data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWAudioInfo data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWCapability data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWCustomDSData data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWDeviceEvent data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWCallback data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWCallback2 data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWEntryPoint data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWEvent data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWFileSystem data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWIdentity data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWPassThru data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWPendingXfers data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWSetupFileXfer data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWSetupMemXfer data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWStatusUtf8 data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWUserInterface data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWCieColor data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWExtImageInfo data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWFilter data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWGrayResponse data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWImageInfo data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWImageLayout data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWImageMemXfer data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWJpegCompression data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWPalette8 data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWRgbResponse data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             TWStatus data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public static ReturnCode DsmEntry( | 
					
						
							|  |  |  |  |             TWIdentity origin, | 
					
						
							|  |  |  |  |             TWIdentity destination, | 
					
						
							|  |  |  |  |             DataArgumentType dat, | 
					
						
							|  |  |  |  |             Message msg, | 
					
						
							|  |  |  |  |             ref TWMemory data) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             if (Platform.IsWin) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |                 if (Platform.UseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, dat, msg, ref data); } | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |                 else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, dat, msg, ref data); } | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2014-04-20 16:57:38 -04:00
										 |  |  |  |             else if (Platform.IsLinux) | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2014-04-14 19:04:48 -04:00
										 |  |  |  |                 return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, dat, msg, ref data); | 
					
						
							| 
									
										
										
										
											2014-04-12 07:10:56 -04:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             throw new PlatformNotSupportedException(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         #endregion | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |