public static AVAudioRecorder ToUrl(NSUrl url, AVAudioRecorderSettings settings, out NSError error) { if (settings == null) throw new ArgumentNullException ("settings"); return ToUrl (url, settings.ToDictionary (), out error); }
public static unsafe NSData SendSynchronousRequest(NSUrlRequest request, out NSUrlResponse response, out NSError error) { IntPtr responseStorage = IntPtr.Zero; IntPtr errorStorage = IntPtr.Zero; void *resp = &responseStorage; void *errp = &errorStorage; IntPtr rhandle = (IntPtr) resp; IntPtr ehandle = (IntPtr) errp; var res = Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr ( class_ptr, selSendSynchronousRequestReturningResponseError.Handle, request.Handle, rhandle, ehandle); if (responseStorage != IntPtr.Zero) response = (NSUrlResponse) Runtime.GetNSObject (responseStorage); else response = null; if (errorStorage != IntPtr.Zero) error = (NSError) Runtime.GetNSObject (errorStorage); else error = null; return (NSData) Runtime.GetNSObject (res); }
public override void FailedWithError(NSUrlConnection connection, NSError error) { if (stream != null) { stream.Complete(); } waitEvent.Set(); }
public NSErrorException (NSError error) : base (error.LocalizedDescription, error.UserInfo == null ? null : error.UserInfo.ContainsKey (NSError.UnderlyingErrorKey) ? new NSErrorException ((NSError)error.UserInfo[NSError.UnderlyingErrorKey]) : null) { this.error = error; HResult = error.Code; }
public static NSError RegisterFontsForUrl (NSUrl fontUrl, CTFontManagerScope scope) { if (fontUrl == null) throw new ArgumentNullException ("fontUrl"); NSError e = new NSError (ErrorDomain, 0); if (CTFontManagerRegisterFontsForURL (fontUrl.Handle, scope, e.Handle)) return null; else return e; }
public static AVAudioPlayer FromUrl(NSUrl url, out NSError error) { unsafe { IntPtr errhandle; IntPtr ptrtohandle = (IntPtr) (&errhandle); var ap = new AVAudioPlayer (url, ptrtohandle); if (ap.Handle == IntPtr.Zero){ error = (NSError) Runtime.GetNSObject (errhandle); return null; } else error = null; return ap; } }
public override bool ReadFromUrl (NSUrl url, string typeName, out NSError outError) { Console.WriteLine ("ReadFromUrl : {0}", url.ToString ()); outError = null; // if scheme is not right, we ignore the url if (url.Scheme != "monodoc" && url.Scheme != "mdoc") return true; // ResourceSpecifier is e.g. "//T:System.String" initialLoadFromUrl = Uri.UnescapeDataString (url.ResourceSpecifier.Substring (2)); this.FileUrl = url; return true; }
public bool SetActive(bool beActive, out NSError outError) { unsafe { IntPtr errhandle; IntPtr ptrtohandle = (IntPtr) (&errhandle); if (SetActive (beActive, ptrtohandle)){ outError = null; return true; } else { outError = (NSError) Runtime.GetNSObject (errhandle); return false; } } }
public bool SetCategory(NSString theCategory, out NSError outError) { unsafe { IntPtr errhandle; IntPtr ptrtohandle = (IntPtr) (&errhandle); if (SetCategory (theCategory, ptrtohandle)){ outError = null; return true; } else { outError = (NSError) Runtime.GetNSObject (errhandle); return false; } } }
public static AVAudioRecorder ToUrl(NSUrl url, NSDictionary settings, out NSError error) { unsafe { IntPtr errhandle; IntPtr ptrtohandle = (IntPtr) (&errhandle); var ap = new AVAudioRecorder (url, settings, ptrtohandle); if (ap.Handle == IntPtr.Zero){ error = (NSError) Runtime.GetNSObject (errhandle); return null; } else error = null; return ap; } }
public bool SetActive(bool beActive, AVAudioSessionFlags flags, out NSError outError) { unsafe { IntPtr errhandle; IntPtr ptrtohandle = (IntPtr) (&errhandle); if (_SetActive (beActive, (int) flags, ptrtohandle)){ outError = null; return true; } else { outError = (NSError) Runtime.GetNSObject (errhandle); return false; } } }
private void PlatformInitialize() { var err = new NSError(); _mMovie = new QTMovie(FileName, out err); if (_mMovie != null) { MovieView = new QTMovieView(); MovieView.Movie = _mMovie; MovieView.IsControllerVisible = false; } else Console.WriteLine(err); }
public override bool ReadFromUrl (NSUrl url, string typeName, out NSError outError) { Console.WriteLine ("ReadFromUrl : {0}", url.ToString ()); outError = null; const int NSServiceMiscellaneousError = 66800; if (url.Scheme != "monodoc" && url.Scheme != "mdoc") { outError = new NSError (NSError.CocoaErrorDomain, NSServiceMiscellaneousError, NSDictionary.FromObjectAndKey (NSError.LocalizedFailureReasonErrorKey, new NSString (string.Format ("Scheme {0} isn't supported", url.Scheme)))); return false; } // ResourceSpecifier is e.g. "//T:System.String" initialLoadFromUrl = Uri.UnescapeDataString (url.ResourceSpecifier.Substring (2)); this.FileUrl = url; return true; }
static unsafe NSData SendSynchronousRequest(NSUrlRequest request, out NSUrlResponse response, NSError error) { IntPtr storage = IntPtr.Zero; void *p = &storage; IntPtr handle = (IntPtr) p; var res = Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr ( class_ptr, selSendSynchronousRequestReturningResponseError.Handle, request.Handle, handle, error != null ? error.Handle : IntPtr.Zero); if (storage != IntPtr.Zero) response = (NSUrlResponse) Runtime.GetNSObject (storage); else response = null; return (NSData) Runtime.GetNSObject (res); }
public override bool ReadFromUrl (NSUrl url, string typeName, out NSError outError) { fsEvents = new FSEventStream (new [] { Path.GetDirectoryName (url.Path) }, TimeSpan.FromSeconds (0), FSEventStreamCreateFlags.FileEvents); fsEvents.Events += (sender, e) => { foreach (var evnt in e.Events) { if (evnt.Path == url.Path && (evnt.Flags & FSEventStreamEventFlags.ItemModified) != 0) { ReloadDocument (); break; } } }; fsEvents.ScheduleWithRunLoop (NSRunLoop.Current); fsEvents.Start (); documentUrl = url; outError = null; return true; }
public bool SetResource (string key, NSObject value, out NSError error) { return SetResourceValue (value, key, out error); }
public bool TryGetResource (string key, out NSObject value, out NSError error) { return GetResourceValue (out value, key, out error); }
public override bool ReadFromUrl (NSUrl absoluteUrl, string typeName, out NSError outError) { var loaded = QTMovie.FromUrl (absoluteUrl, out outError); if (loaded != null){ loaded.SetAttribute (NSNumber.FromBoolean (true), QTMovie.EditableAttribute); if (movie != null) movie.Dispose (); movie = loaded; } return loaded != null; }
public override bool WriteToUrl (NSUrl absoluteUrl, string typeName, NSSaveOperationType saveOperation, NSUrl absoluteOriginalContentsUrl, out NSError outError) { var saveOptions = new QTMovieSaveOptions () { Flatten = true }; return movie.SaveTo (absoluteUrl.Path, new QTMovieSaveOptions () { Flatten = true }, out outError); }
public bool CreateDirectory(string path, bool createIntermediates, NSFileAttributes attributes, out NSError error) { var dict = attributes == null ? null : attributes.ToDictionary(); return(CreateDirectory(path, createIntermediates, dict, out error)); }
public NSFileSystemAttributes GetFileSystemAttributes(string path, out NSError error) { return NSFileSystemAttributes.FromDict (_GetFileSystemAttributes (path, out error)); }
public override void EncoderError(AVAudioRecorder recorder, NSError error) { if (cbEncoderError != null) cbEncoderError (recorder, new AVErrorEventArgs (error)); }
public AVErrorEventArgs(NSError error) { Error = error; }
// public NSTextView CSharpTextBox; // public NSTextView ConsoleTextBox; // public NSTextView IntermediateTextBox; // public NSTextView CPPTextBox; // // Save support: // Override one of GetAsData, GetAsFileWrapper, or WriteToUrl. // // This method should store the contents of the document using the given typeName // on the return NSData value. public override NSData GetAsData (string documentType, out NSError outError) { outError = NSError.FromDomain (NSError.OsStatusErrorDomain, -4); return null; }
public bool SetAttributes(NSFileAttributes attributes, string path, out NSError error) { return(SetAttributes(attributes.ToDictionary(), path, out error)); }
public NSFileSystemAttributes GetFileSystemAttributes(string path, out NSError error) { return(NSFileSystemAttributes.FromDict(_GetFileSystemAttributes(path, out error))); }
public bool CreateDirectory(string path, bool createIntermediates, NSFileAttributes attributes, out NSError error) { return(CreateDirectory(path, createIntermediates, attributes.ToDictionary(), out error)); }
// // Load support: // Override one of ReadFromData, ReadFromFileWrapper or ReadFromUrl // public override bool ReadFromData (NSData data, string typeName, out NSError outError) { outError = NSError.FromDomain (NSError.OsStatusErrorDomain, -4); return false; }
public bool SetResource(string key, NSObject value, out NSError error) { return(SetResourceValue(value, key, out error)); }
public override void DecoderError(AVAudioPlayer player, NSError error) { if (cbDecoderError != null) cbDecoderError (player, new AVErrorEventArgs (error)); }
public bool SetPreferredHardwareSampleRate (double sampleRate, NSError outError) { // Effectively discarded due to original binding error return SetPreferredHardwareSampleRate (sampleRate, out outError); }
public bool CreateDirectory(string path, bool createIntermediates, NSFileAttributes attributes, out NSError error) { return CreateDirectory (path, createIntermediates, attributes.ToDictionary (), out error); }
public bool SetPreferredIOBufferDuration (double duration, NSError outError) { // Effectively discarded due to original binding error return SetPreferredIOBufferDuration (duration, out outError); }
public bool SetAttributes(NSFileAttributes attributes, string path, out NSError error) { return SetAttributes (attributes.ToDictionary (), path, out error); }
public NSErrorEventArgs(NSError error) { Error = error; }
public override NSPrintOperation PrintOperation (NSDictionary printSettings, out NSError outError) { outError = null; return webView.MainFrame.FrameView.GetPrintOperation (new NSPrintInfo (printSettings)); }
public bool TryGetResource(string key, out NSObject value, out NSError error) { return(GetResourceValue(out value, key, out error)); }