Blame view

DUREX tests/CommunicationProtocol.m 799 Bytes
Imanol-Mikel Barba Sabariego authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
//  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 TRUE;
}

@end