CommunicationProtocol.m 800 Bytes
//
//  CommunicationProtocol.m
//  DUREX Vendor Control
//
//  Created by Imanol Barba on 5/23/14.
//  Copyright (c) 2014 Emmoco. All rights reserved.
//

#import "CommunicationProtocol.h"

@interface CommunicationProtocol ()

@end

@implementation CommunicationProtocol

+ (id)sharedProtocol {
    static CommunicationProtocol *shared = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        shared = [[self alloc] init];
    });
    return shared;
}

-(Boolean) waitForMessageAvailable: (Boolean) status
{
    return TRUE;
}

-(NSString*) readMessage
{
    __block NSMutableString *message;
    [message setString:@""];
    return message;
}

-(Boolean) writeMessage: (NSString*) message
{
    return TRUE;
}

-(Boolean) establishConnection
{
    return FALSE;
}

@end