topical media & game development

talk show tell print

#mobile-application-10-DerbyApp-build-iphone-Classes-TiStreamProxy.h / h



  
Appcelerator Titanium Mobile Copyright (c) 2009-2011 by DerbyApp, Inc. All Rights Reserved. Licensed under the terms of the Apache Public License Please see the LICENSE included with this distribution for details. WARNING: This is generated code. Modify at your own risk and without support.

  
  
  #import <Foundation/Foundation.h>
  #import <TiProxy.h>
  #import <Tibuffer.h>
  #import <KrollCallback.h>
  
  // This is meant to be a largely "virtual" class which defines the following behaviors:
  // 1. Interprets read()/write() calls to the appropriate interal function
  // 2. Provide protocol defining necessary internal functions; read/write, asynch read/write, readAll, 
  @protocol TiStreamInternal <NSObject>
  @required
  // DEFINED BEHAVIOR: callback != nil indicates an asynch operation.  length==0 indicates to read all available data into
  // the buffer (and grow it if necessary).  These methods MAY be called by classes other than the TiStreamProxy ducktype (i.e. Ti.Stream module methods)
  -(int)readToBuffer:(TiBuffer*)buffer offset:(int)offset length:(int)length callback:(KrollCallback*)callback;
  -(int)writeFromBuffer:(TiBuffer*)buffer offset:(int)offset length:(int)length callback:(KrollCallback*)callback;
  
  // Used for writeStream/pumping
  -(int)writeToStream:(id<TiStreamInternal>)output chunkSize:(int)size callback:(KrollCallback*)callback;
  -(void)pumpToCallback:(KrollCallback*)callback chunkSize:(int)size asynch:(BOOL)asynch;
  
  // Public API : No defined behavior
  -(NSNumber*)isReadable:(id)_void; // PUBLIC API FUNCTION
  -(NSNumber*)isWritable:(id)_void; // PUBLIC API FUNCTION
  
  -(void)close:(id)_void; // PUBLIC API FUNCTION
  @end
  
  @interface TiStreamProxy : TiProxy {
      
  }
  
  // Public API
  -(NSNumber*)read:(id)args;
  -(NSNumber*)write:(id)write;
  
  @end
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.