Ejemplo n.º 1
0
 /** @since Available in iOS 2.0 and later. */
 public boolean isValid() throws CFStreamErrorException {
   CFStreamError.CFStreamErrorPtr ptr = new CFStreamError.CFStreamErrorPtr();
   boolean result = isValid(ptr);
   if (ptr.get() != null) {
     throw new CFStreamErrorException(ptr.get());
   }
   return result;
 }
Ejemplo n.º 2
0
 /*</members>*/
 @Callback
 private static void cbInvoke(
     CFNetServiceMonitor monitor,
     CFNetService service,
     CFNetServiceMonitorType infoType,
     CFData data,
     CFStreamError.CFStreamErrorPtr error,
     @Pointer long refcon) {
   ClientCallback callback = null;
   synchronized (callbacks) {
     callback = callbacks.get(refcon);
   }
   CFStreamError err = null;
   if (error != null) err = error.get();
   callback.invoke(monitor, service, infoType, data, err);
 }