| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('bcap'); | 5 #library('bcap'); |
| 6 #import('src/impl_bcap.dart'); | 6 #import('src/impl_bcap.dart'); |
| 7 #source('src/BcapUtil.dart'); | 7 #source('src/BcapUtil.dart'); |
| 8 | 8 |
| 9 // This library implements a Dart binding of the Bcap protocol. | 9 // This library implements a Dart binding of the Bcap protocol. |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 typedef void FailureI(BcapError err); | 85 typedef void FailureI(BcapError err); |
| 86 | 86 |
| 87 interface BcapServerInterface { | 87 interface BcapServerInterface { |
| 88 void invoke(String ser, String method, String data, SuccessI ski, FailureI fki
); | 88 void invoke(String ser, String method, String data, SuccessI ski, FailureI fki
); |
| 89 } | 89 } |
| 90 | 90 |
| 91 typedef BcapHandler Reviver(String key); | 91 typedef BcapHandler Reviver(String key); |
| 92 typedef BcapServerInterface Resolver(String instID); | 92 typedef BcapServerInterface Resolver(String instID); |
| 93 typedef void SaveState(String state); | 93 typedef void SaveState(String state); |
| 94 | 94 |
| 95 interface BcapServer extends BcapServerInterface factory BcapServerImpl { | 95 interface BcapServer extends BcapServerInterface default BcapServerImpl { |
| 96 BcapServer(String instanceID, [String snapshot, SaveState saveState]); | 96 BcapServer(String instanceID, [String snapshot, SaveState saveState]); |
| 97 | 97 |
| 98 void setReviver(Reviver newReviver); | 98 void setReviver(Reviver newReviver); |
| 99 void setResolver(Resolver newResolver); | 99 void setResolver(Resolver newResolver); |
| 100 | 100 |
| 101 Object dataPreProcess(Object data); | 101 Object dataPreProcess(Object data); |
| 102 Object dataPostProcess(Object data); | 102 Object dataPostProcess(Object data); |
| 103 | 103 |
| 104 String snapshot(); | 104 String snapshot(); |
| 105 | 105 |
| 106 Bcap grant(BcapHandler handler, [String key]); | 106 Bcap grant(BcapHandler handler, [String key]); |
| 107 Bcap grantFunc(BcapSyncFunction f, [String key]); | 107 Bcap grantFunc(BcapSyncFunction f, [String key]); |
| 108 Bcap grantAsyncFunc(BcapAsyncFunction f, [String key]); | 108 Bcap grantAsyncFunc(BcapAsyncFunction f, [String key]); |
| 109 | 109 |
| 110 Bcap grantKey(String key); | 110 Bcap grantKey(String key); |
| 111 Bcap restore(String ser); | 111 Bcap restore(String ser); |
| 112 | 112 |
| 113 void revoke(String ser); | 113 void revoke(String ser); |
| 114 void revokeAll(); | 114 void revokeAll(); |
| 115 } | 115 } |
| 116 | 116 |
| OLD | NEW |