Merge pull request #2247 from ivmai/match-ext-libgc-api
[mono.git] / mcs / class / System.ServiceModel.Internals / MobileStubs.cs
1 // help compiles sources for mobile without having unusable
2 // Windows p/invoke in the assemblies
3 //
4 // Copyright 2015 Xamarin Inc.
5
6 #if MOBILE
7
8 namespace System.Runtime.Interop {
9
10         using Microsoft.Win32.SafeHandles;
11         using System.Runtime.Diagnostics;
12         using System.Runtime.InteropServices;
13         using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
14
15         sealed class SafeEventLogWriteHandle : SafeHandleZeroOrMinusOneIsInvalid {
16
17                 SafeEventLogWriteHandle () : base (true)
18                 {
19                 }
20
21                 public static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
22                 {
23                         throw new NotImplementedException ();
24                 }
25
26                 static bool DeregisterEventSource (IntPtr hEventLog)
27                 {
28                         throw new NotImplementedException ();
29                 }
30
31                 protected override bool ReleaseHandle ()
32                 {
33                         throw new NotImplementedException ();
34                 }
35         }
36
37         static class UnsafeNativeMethods {
38
39                 public const int ERROR_MORE_DATA = 234;
40                 public const int ERROR_ARITHMETIC_OVERFLOW = 534;
41                 public const int ERROR_NOT_ENOUGH_MEMORY = 8;
42
43                 [StructLayout (LayoutKind.Explicit, Size = 16)]
44                 public struct EventData {
45                         [FieldOffset(0)]
46                         internal UInt64 DataPointer;
47                         [FieldOffset(8)]
48                         internal uint Size;
49                         [FieldOffset(12)]
50                         internal int Reserved;
51                 }
52
53                 public static SafeWaitHandle CreateWaitableTimer (IntPtr mustBeZero, bool manualReset, string timerName)
54                 {
55                         throw new NotImplementedException ();
56                 }
57
58                 public static bool SetWaitableTimer (SafeWaitHandle handle, ref long dueTime, int period, IntPtr mustBeZero, IntPtr mustBeZeroAlso, bool resume)
59                 {
60                         throw new NotImplementedException ();
61                 }
62
63                 public static int QueryPerformanceCounter (out long time)
64                 {
65                         throw new NotImplementedException ();
66                 }
67
68                 public static uint GetSystemTimeAdjustment (out int adjustment, out uint increment, out uint adjustmentDisabled)
69                 {
70                         throw new NotImplementedException ();
71                 }
72
73                 public static void GetSystemTimeAsFileTime (out long time)
74                 {
75                         throw new NotImplementedException ();
76                 }
77
78                 internal static string GetComputerName (ComputerNameFormat nameType)
79                 {
80                         throw new NotImplementedException ();
81                 }
82
83                 internal static bool IsDebuggerPresent ()
84                 {
85                         throw new NotImplementedException ();
86                 }
87
88                 internal static void DebugBreak ()
89                 {
90                         throw new NotImplementedException ();
91                 }
92
93                 internal static void OutputDebugString (string lpOutputString)
94                 {
95                         throw new NotImplementedException ();
96                 }
97
98                 internal unsafe delegate void EtwEnableCallback (ref Guid sourceId, int isEnabled, byte level, long matchAnyKeywords, long matchAllKeywords, void* filterData, void* callbackContext);
99
100                 internal static unsafe uint EventRegister (ref Guid providerId, EtwEnableCallback enableCallback, void* callbackContext, ref long registrationHandle)
101                 {
102                         throw new NotImplementedException ();
103                 }
104
105                 internal static uint EventUnregister (long registrationHandle)
106                 {
107                         throw new NotImplementedException ();
108                 }
109
110                 internal static bool EventEnabled (long registrationHandle, ref EventDescriptor eventDescriptor)
111                 {
112                         throw new NotImplementedException ();
113                 }
114
115                 internal static unsafe uint EventWrite (long registrationHandle, ref EventDescriptor eventDescriptor, uint userDataCount, EventData* userData)
116                 {
117                         throw new NotImplementedException ();
118                 }
119
120                 internal static unsafe uint EventWriteTransfer (long registrationHandle, ref EventDescriptor eventDescriptor, ref Guid activityId, ref Guid relatedActivityId, uint userDataCount, EventData* userData)
121                 {
122                         throw new NotImplementedException ();
123                 }
124
125                 internal static unsafe uint EventWriteString (long registrationHandle, byte level, long keywords, char* message)
126                 {
127                         throw new NotImplementedException ();
128                 }
129
130                 internal static unsafe uint EventActivityIdControl (int ControlCode, ref Guid ActivityId)
131                 {
132                         throw new NotImplementedException ();
133                 }
134
135                 internal static bool ReportEvent (SafeHandle hEventLog, ushort type, ushort category, uint eventID, byte[] userSID, ushort numStrings, uint dataLen, HandleRef strings, byte[] rawData)
136                 {
137                         throw new NotImplementedException ();
138                 }
139
140                 internal static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
141                 {
142                         throw new NotImplementedException ();
143                 }
144         }
145 }
146 #endif