shlist

share and manage lists between multiple people
Log | Files | Refs

Network.h (494B)


      1 #import <UIKit/UIKit.h>
      2 
      3 #import "MsgTypes.h"
      4 
      5 @interface Network : NSObject <NSStreamDelegate> {
      6 	NSInputStream *input_stream;
      7 	NSOutputStream *output_stream;
      8 }
      9 
     10 - (void) connect;
     11 - (void) disconnect;
     12 
     13 // only networking really cares about the device id
     14 - (bool) load_device_id:(NSString *)phone_number;
     15 - (NSString *) get_device_id;
     16 - (bool) connected;
     17 - (bool) send_message:(uint16_t)msg_type contents:(NSObject *)data;
     18 
     19 // returns singleton instance
     20 + (id) shared_network_connection;
     21 
     22 @end