CGEchoController.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /******************************************************************
  2. *
  3. * uEcho for ObjC
  4. *
  5. * Copyright (C) Satoshi Konno 2015
  6. *
  7. * This is licensed under BSD-style license, see file COPYING.
  8. *
  9. ******************************************************************/
  10. #import <Foundation/NSArray.h>
  11. #import <Foundation/NSString.h>
  12. #import <CGEcho/CGEchoMessage.h>
  13. #import <CGEcho/CGEchoNode.h>
  14. #import <CGEcho/CGEchoObject.h>
  15. @class CGEchoController;
  16. @protocol CGEchoControllerObserver <NSObject>
  17. @optional
  18. - (void)nodeAdded:(CGEchoController*)controller node:(CGEchoNode*)node message:(CGEchoMessage*)msg;
  19. - (void)nodeUpdated:(CGEchoController*)controller node:(CGEchoNode*)node message:(CGEchoMessage*)msg;
  20. - (void)nodeAnnounced:(CGEchoController*)controller node:(CGEchoNode*)node message:(CGEchoMessage*)msg;
  21. - (void)nodeResponsed:(CGEchoController*)controller node:(CGEchoNode*)node message:(CGEchoMessage*)msg;
  22. @end
  23. @interface CGEchoController : NSObject {
  24. }
  25. @property (assign) id<CGEchoControllerObserver> observer;
  26. - (id)init;
  27. - (NSArray*)nodes;
  28. - (BOOL)start;
  29. - (BOOL)stop;
  30. - (BOOL)search;
  31. - (BOOL)announceMessage:(CGEchoNode*)node message:(CGEchoMessage*)msg;
  32. - (BOOL)sendMessage:(CGEchoNode*)node object:(CGEchoObject*)obj message:(CGEchoMessage*)msg;
  33. - (CGEchoMessage*)postMessage:(CGEchoNode*)node object:(CGEchoObject*)obj message:(CGEchoMessage*)msg;
  34. @end