com.bugvm.apple.foundation.NSURLAuthenticationMethod Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2013-2015 RoboVM AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bugvm.apple.foundation;
/**/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
import com.bugvm.apple.corefoundation.*;
import com.bugvm.apple.uikit.*;
import com.bugvm.apple.coretext.*;
import com.bugvm.apple.coreanimation.*;
import com.bugvm.apple.coredata.*;
import com.bugvm.apple.coregraphics.*;
import com.bugvm.apple.coremedia.*;
import com.bugvm.apple.security.*;
import com.bugvm.apple.dispatch.*;
/* */
/**/
/* */
/**/@Library("Foundation") @StronglyLinked/* */
@Marshaler(/**/NSURLAuthenticationMethod/* */.Marshaler.class)
/**/public/* */ class /**/NSURLAuthenticationMethod/* */
extends /**/GlobalValueEnumeration/* */
/**//* */ {
static { Bro.bind(/**/NSURLAuthenticationMethod/* */.class); }
/**/
public static class Marshaler {
@MarshalsPointer
public static NSURLAuthenticationMethod toObject(Class cls, long handle, long flags) {
NSString o = (NSString) NSObject.Marshaler.toObject(NSString.class, handle, flags);
if (o == null) {
return null;
}
return NSURLAuthenticationMethod.valueOf(o);
}
@MarshalsPointer
public static long toNative(NSURLAuthenticationMethod o, long flags) {
if (o == null) {
return 0L;
}
return NSObject.Marshaler.toNative(o.value(), flags);
}
}
public static class AsListMarshaler {
@SuppressWarnings("unchecked")
@MarshalsPointer
public static List toObject(Class extends NSObject> cls, long handle, long flags) {
NSArray o = (NSArray) NSObject.Marshaler.toObject(NSArray.class, handle, flags);
if (o == null) {
return null;
}
List list = new ArrayList<>();
for (int i = 0; i < o.size(); i++) {
list.add(NSURLAuthenticationMethod.valueOf(o.get(i)));
}
return list;
}
@MarshalsPointer
public static long toNative(List l, long flags) {
if (l == null) {
return 0L;
}
NSArray array = new NSMutableArray<>();
for (NSURLAuthenticationMethod o : l) {
array.add(o.value());
}
return NSObject.Marshaler.toNative(array, flags);
}
}
/* */
/**/
public static final NSURLAuthenticationMethod Default = new NSURLAuthenticationMethod("Default");
public static final NSURLAuthenticationMethod HTTPBasic = new NSURLAuthenticationMethod("HTTPBasic");
public static final NSURLAuthenticationMethod HTTPDigest = new NSURLAuthenticationMethod("HTTPDigest");
public static final NSURLAuthenticationMethod HTMLForm = new NSURLAuthenticationMethod("HTMLForm");
/**
* @since Available in iOS 2.0 and later.
*/
public static final NSURLAuthenticationMethod NTLM = new NSURLAuthenticationMethod("NTLM");
/**
* @since Available in iOS 2.0 and later.
*/
public static final NSURLAuthenticationMethod Negotiate = new NSURLAuthenticationMethod("Negotiate");
/**
* @since Available in iOS 3.0 and later.
*/
public static final NSURLAuthenticationMethod ClientCertificate = new NSURLAuthenticationMethod("ClientCertificate");
/**
* @since Available in iOS 3.0 and later.
*/
public static final NSURLAuthenticationMethod ServerTrust = new NSURLAuthenticationMethod("ServerTrust");
/* */
private static /**/NSURLAuthenticationMethod/* */[] values = new /**/NSURLAuthenticationMethod/* */[] {/**/Default, HTTPBasic, HTTPDigest, HTMLForm, NTLM, Negotiate, ClientCertificate, ServerTrust/* */};
/**/NSURLAuthenticationMethod/* */ (String getterName) {
super(Values.class, getterName);
}
public static /**/NSURLAuthenticationMethod/* */ valueOf(/**/NSString/* */ value) {
for (/**/NSURLAuthenticationMethod/* */ v : values) {
if (v.value().equals(value)) {
return v;
}
}
throw new IllegalArgumentException("No constant with value " + value + " found in "
+ /**/NSURLAuthenticationMethod/* */.class.getName());
}
/**//* */
/**/@Library("Foundation") @StronglyLinked/* */
public static class Values {
static { Bro.bind(Values.class); }
/**/
@GlobalValue(symbol="NSURLAuthenticationMethodDefault", optional=true)
public static native NSString Default();
@GlobalValue(symbol="NSURLAuthenticationMethodHTTPBasic", optional=true)
public static native NSString HTTPBasic();
@GlobalValue(symbol="NSURLAuthenticationMethodHTTPDigest", optional=true)
public static native NSString HTTPDigest();
@GlobalValue(symbol="NSURLAuthenticationMethodHTMLForm", optional=true)
public static native NSString HTMLForm();
/**
* @since Available in iOS 2.0 and later.
*/
@GlobalValue(symbol="NSURLAuthenticationMethodNTLM", optional=true)
public static native NSString NTLM();
/**
* @since Available in iOS 2.0 and later.
*/
@GlobalValue(symbol="NSURLAuthenticationMethodNegotiate", optional=true)
public static native NSString Negotiate();
/**
* @since Available in iOS 3.0 and later.
*/
@GlobalValue(symbol="NSURLAuthenticationMethodClientCertificate", optional=true)
public static native NSString ClientCertificate();
/**
* @since Available in iOS 3.0 and later.
*/
@GlobalValue(symbol="NSURLAuthenticationMethodServerTrust", optional=true)
public static native NSString ServerTrust();
/* */
}
}