GenCallbacks(stream, iface, true);
GenDelegateId(stream, iface);
GenMethodId(stream, iface);
- stream << CB_EVENT_METHODS;
+ GenEventMethods(stream, iface);
GenSerializer(stream);
GenListSerializer(stream);
GenShareFile(stream, iface, true);
GenCtor(stream, iface);
- GenConnectMethod(stream, iface);
+ GenConnectMethods(stream, iface);
GenMethods(stream, iface);
});
}
});
}
-void CsCionProxyGen::GenConnectMethod(std::ofstream& stream,
+void CsCionProxyGen::GenConnectMethods(std::ofstream& stream,
const Interface& iface) {
ReplaceAll(CB_CONNECT_METHOD)
.Change("<PEER_INFO_T>", GetTransportable().Cs().GenPeerInfoType())
stream << NLine(1);
}
+void CsCionProxyGen::GenEventMethods(std::ofstream& stream,
+ const Interface& iface) {
+ ReplaceAll(CB_EVENT_METHODS)
+ .Change("<PEER_INFO_T>", GetTransportable().Cs().GenPeerInfoType())
+ .Change("<PAYLOAD_T>", GetTransportable().Cs().GenPayloadType())
+ .Change("<PAYLOAD_TYPE_FILE>",
+ GetTransportable().Cs().GenPayloadTypeFile())
+ .Change("<PAYLOAD_TRANSFER_STATUS>",
+ GetTransportable().Cs().GenPayloadTransferStatusType())
+ .Out(stream);
+}
+
void CsCionProxyGen::GenMethods(std::ofstream& stream, const Interface& iface) {
auto& decls = iface.GetDeclarations();
void GenInterfaces(std::ofstream& stream);
void GenInterface(std::ofstream& stream, const Interface& iface);
void GenCtor(std::ofstream& stream, const Interface& iface);
- void GenConnectMethod(std::ofstream& stream, const Interface& iface);
+ void GenConnectMethods(std::ofstream& stream, const Interface& iface);
+ void GenEventMethods(std::ofstream& stream, const Interface& iface);
void GenMethods(std::ofstream& stream, const Interface& iface);
void GenInvocation(std::ofstream& stream, const Declaration& decl);
};
stream << Tab(2) << "public sealed class " << iface.GetID()
<< " : ServerBase" << NLine(1);
GenBrace(stream, TAB_SIZE * 2, [&]() {
+ stream << ReplaceAll(CB_DATA_MEMBERS, "<VERSION>", FULLVER);
GenServiceBase(stream, iface);
GenCallbacks(stream, iface, false);
GenDelegateId(stream, iface);