Factored Narya into two Maven modules: core and tools.
This will allow us to properly ship narya-tools.jar to Maven Central which is necessary for Nenya and Vilya (and any other Narya-using project) to themselves be built. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6776 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
+163
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="EclipseModuleManager">
|
||||
<varelement var="jar://$M2_REPO$/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" value="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" />
|
||||
<varelement var="jar://$M2_REPO$/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar!/" value="src:M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar" />
|
||||
<varelement var="jar://$M2_REPO$/com/google/inject/guice/2.0/guice-2.0.jar!/" value="M2_REPO/com/google/inject/guice/2.0/guice-2.0.jar" />
|
||||
<varelement var="jar://$M2_REPO$/javassist/javassist/3.8.0.GA/javassist-3.8.0.GA.jar!/" value="M2_REPO/javassist/javassist/3.8.0.GA/javassist-3.8.0.GA.jar" />
|
||||
<varelement var="jar://$M2_REPO$/javassist/javassist/3.8.0.GA/javassist-3.8.0.GA-sources.jar!/" value="src:M2_REPO/javassist/javassist/3.8.0.GA/javassist-3.8.0.GA-sources.jar" />
|
||||
<varelement var="jar://$M2_REPO$/com/samskivert/jmustache/1.0/jmustache-1.0.jar!/" value="M2_REPO/com/samskivert/jmustache/1.0/jmustache-1.0.jar" />
|
||||
<varelement var="jar://$M2_REPO$/com/samskivert/jmustache/1.0/jmustache-1.0-sources.jar!/" value="src:M2_REPO/com/samskivert/jmustache/1.0/jmustache-1.0-sources.jar" />
|
||||
<varelement var="jar://$M2_REPO$/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar!/" value="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar" />
|
||||
<varelement var="jar://$M2_REPO$/javax/annotation/jsr250-api/1.0/jsr250-api-1.0-sources.jar!/" value="src:M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0-sources.jar" />
|
||||
</component>
|
||||
<component name="FacetManager">
|
||||
<facet type="flex" name="Flex">
|
||||
<configuration flex_sdk="Flex SDK (player 10)">
|
||||
<option name="DO_BUILD" value="true" />
|
||||
<option name="OUTPUT_TYPE" value="Library" />
|
||||
<option name="USE_DEFAULT_SDK_CONFIG_FILE" value="true" />
|
||||
<option name="USE_CUSTOM_CONFIG_FILE" value="false" />
|
||||
<option name="CUSTOM_CONFIG_FILE" value="" />
|
||||
<option name="USE_CUSTOM_CONFIG_FILE_FOR_TESTS" value="false" />
|
||||
<option name="CUSTOM_CONFIG_FILE_FOR_TESTS" value="" />
|
||||
<option name="APPLICATION_ENTRY_POINT" value="" />
|
||||
<option name="MAIN_CLASS" value="" />
|
||||
<option name="OUTPUT_FILE_NAME" value="naryalib.swc" />
|
||||
<option name="USE_FACET_COMPILE_OUTPUT_PATH" value="true" />
|
||||
<option name="FACET_COMPILE_OUTPUT_PATH" value="$MODULE_DIR$/target" />
|
||||
<option name="INCLUDE_RESOURCE_FILES_IN_SWC" value="false" />
|
||||
<option name="TARGET_PLAYER_VERSION" value="10" />
|
||||
<option name="STATIC_LINK_RUNTIME_SHARED_LIBRARIES" value="true" />
|
||||
<option name="USE_LOCALE_SETTINGS" value="false" />
|
||||
<option name="LOCALE" value="en_US" />
|
||||
<option name="ADDITIONAL_COMPILER_OPTIONS" value="" />
|
||||
<option name="VERSION" value="3" />
|
||||
<option name="PATH_TO_SERVICES_CONFIG_XML" value="" />
|
||||
<option name="CONTEXT_ROOT" value="" />
|
||||
<NAMESPACE_AND_MANIFEST_FILE_INFO_LIST />
|
||||
<CONDITIONAL_COMPILATION_DEFINITION_LIST />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/as" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="aopalliance-1.0.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$M2_REPO$/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$M2_REPO$/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="guice-2.0.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$M2_REPO$/com/google/inject/guice/2.0/guice-2.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="javassist-3.8.0.GA.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$M2_REPO$/javassist/javassist/3.8.0.GA/javassist-3.8.0.GA.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$M2_REPO$/javassist/javassist/3.8.0.GA/javassist-3.8.0.GA-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="jmustache-1.0.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$M2_REPO$/com/samskivert/jmustache/1.0/jmustache-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$M2_REPO$/com/samskivert/jmustache/1.0/jmustache-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$M2_REPO$/com/samskivert/jmustache/1.0/jmustache-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="jsr250-api-1.0.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$M2_REPO$/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$M2_REPO$/javax/annotation/jsr250-api/1.0/jsr250-api-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="signals-0.8.swc">
|
||||
<CLASSES>
|
||||
<root url="jar://$M2_REPO$/org/osflash/signals/0.8/signals-0.8.swc!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$M2_REPO$/com/adobe/as3corelib/0.93/as3corelib-0.93.swc!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module" module-name="depot" exported="" />
|
||||
<orderEntry type="module" module-name="gwt-utils" exported="" />
|
||||
<orderEntry type="module" module-name="aspirin" exported="" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="AUTOGENERATED library equal to Flex SDK Flex SDK (player 10)">
|
||||
<CLASSES>
|
||||
<root url="jar://$FLEX_DIR$/frameworks/libs/flex.swc!/" />
|
||||
<root url="jar://$FLEX_DIR$/frameworks/libs/framework.swc!/" />
|
||||
<root url="jar://$FLEX_DIR$/frameworks/libs/rpc.swc!/" />
|
||||
<root url="jar://$FLEX_DIR$/frameworks/libs/utilities.swc!/" />
|
||||
<root url="jar://$FLEX_DIR$/frameworks/locale/en_US/airframework_rb.swc!/" />
|
||||
<root url="jar://$FLEX_DIR$/frameworks/locale/en_US/framework_rb.swc!/" />
|
||||
<root url="jar://$FLEX_DIR$/frameworks/locale/en_US/rpc_rb.swc!/" />
|
||||
<root url="jar://$FLEX_DIR$/frameworks/libs/player/10/playerglobal.swc!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/air/ApplicationUpdater/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/air/ServiceMonitor/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/airframework/bundles/en_US/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/airframework/bundles/ja_JP/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/airframework/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/flex/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/framework/bundles/en_US/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/framework/bundles/ja_JP/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/framework/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/haloclassic/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/rpc/bundles/en_US/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/rpc/bundles/ja_JP/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/rpc/src" />
|
||||
<root url="file://$FLEX_DIR$/frameworks/projects/utilities/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,636 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
CB92991A128795A7008E62AD /* ArrayMask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298AC128795A7008E62AD /* ArrayMask.cpp */; };
|
||||
CB92991B128795A7008E62AD /* BoxedBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298AF128795A7008E62AD /* BoxedBoolean.cpp */; };
|
||||
CB92991C128795A7008E62AD /* BoxedByte.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298B1128795A7008E62AD /* BoxedByte.cpp */; };
|
||||
CB92991D128795A7008E62AD /* BoxedDouble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298B3128795A7008E62AD /* BoxedDouble.cpp */; };
|
||||
CB92991E128795A7008E62AD /* BoxedFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298B5128795A7008E62AD /* BoxedFloat.cpp */; };
|
||||
CB92991F128795A7008E62AD /* BoxedInt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298B7128795A7008E62AD /* BoxedInt.cpp */; };
|
||||
CB929920128795A7008E62AD /* BoxedShort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298B9128795A7008E62AD /* BoxedShort.cpp */; };
|
||||
CB929921128795A7008E62AD /* Registration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298BE128795A7008E62AD /* Registration.cpp */; };
|
||||
CB929922128795A7008E62AD /* ClientObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298C1128795A7008E62AD /* ClientObject.cpp */; };
|
||||
CB929923128795A7008E62AD /* InvocationMarshaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298C3128795A7008E62AD /* InvocationMarshaller.cpp */; };
|
||||
CB929924128795A7008E62AD /* PermissionPolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298C5128795A7008E62AD /* PermissionPolicy.cpp */; };
|
||||
CB929925128795A7008E62AD /* RegistrationMarshaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298C7128795A7008E62AD /* RegistrationMarshaller.cpp */; };
|
||||
CB929926128795A7008E62AD /* DEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298CB128795A7008E62AD /* DEvent.cpp */; };
|
||||
CB929927128795A7008E62AD /* DObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298CD128795A7008E62AD /* DObject.cpp */; };
|
||||
CB929928128795A7008E62AD /* DSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298CF128795A7008E62AD /* DSet.cpp */; };
|
||||
CB929929128795A7008E62AD /* EntryAddedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298D1128795A7008E62AD /* EntryAddedEvent.cpp */; };
|
||||
CB92992A128795A7008E62AD /* EntryRemovedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298D3128795A7008E62AD /* EntryRemovedEvent.cpp */; };
|
||||
CB92992B128795A7008E62AD /* InvocationNotificationEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298D5128795A7008E62AD /* InvocationNotificationEvent.cpp */; };
|
||||
CB92992C128795A7008E62AD /* InvocationRequestEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298D7128795A7008E62AD /* InvocationRequestEvent.cpp */; };
|
||||
CB92992D128795A7008E62AD /* NamedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298D9128795A7008E62AD /* NamedEvent.cpp */; };
|
||||
CB92992E128795A7008E62AD /* InvocationDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298DB128795A7008E62AD /* InvocationDecoder.cpp */; };
|
||||
CB92992F128795A7008E62AD /* FramedInputStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298DE128795A7008E62AD /* FramedInputStream.cpp */; };
|
||||
CB929930128795A7008E62AD /* FramingOutputStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298E0128795A7008E62AD /* FramingOutputStream.cpp */; };
|
||||
CB929931128795A7008E62AD /* AuthRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298E5128795A7008E62AD /* AuthRequest.cpp */; };
|
||||
CB929932128795A7008E62AD /* AuthResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298E7128795A7008E62AD /* AuthResponse.cpp */; };
|
||||
CB929933128795A7008E62AD /* AuthResponseData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298E9128795A7008E62AD /* AuthResponseData.cpp */; };
|
||||
CB929934128795A7008E62AD /* BootstrapData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298EB128795A7008E62AD /* BootstrapData.cpp */; };
|
||||
CB929935128795A7008E62AD /* BootstrapNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298ED128795A7008E62AD /* BootstrapNotification.cpp */; };
|
||||
CB929936128795A7008E62AD /* Credentials.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298EF128795A7008E62AD /* Credentials.cpp */; };
|
||||
CB929937128795A7008E62AD /* DownstreamMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298F1128795A7008E62AD /* DownstreamMessage.cpp */; };
|
||||
CB929938128795A7008E62AD /* EventNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298F3128795A7008E62AD /* EventNotification.cpp */; };
|
||||
CB929939128795A7008E62AD /* ForwardEventRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298F5128795A7008E62AD /* ForwardEventRequest.cpp */; };
|
||||
CB92993A128795A7008E62AD /* ObjectResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298F7128795A7008E62AD /* ObjectResponse.cpp */; };
|
||||
CB92993B128795A7008E62AD /* PingRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298F9128795A7008E62AD /* PingRequest.cpp */; };
|
||||
CB92993C128795A7008E62AD /* PongResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298FB128795A7008E62AD /* PongResponse.cpp */; };
|
||||
CB92993D128795A7008E62AD /* UpstreamMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298FD128795A7008E62AD /* UpstreamMessage.cpp */; };
|
||||
CB92993E128795A7008E62AD /* UsernamePasswordCreds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB9298FF128795A7008E62AD /* UsernamePasswordCreds.cpp */; };
|
||||
CB92993F128795A7008E62AD /* ObjectInputStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB929901128795A7008E62AD /* ObjectInputStream.cpp */; };
|
||||
CB929940128795A7008E62AD /* ObjectOutputStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB929903128795A7008E62AD /* ObjectOutputStream.cpp */; };
|
||||
CB929941128795A7008E62AD /* CFSocketStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB929906128795A7008E62AD /* CFSocketStream.cpp */; };
|
||||
CB929942128795A7008E62AD /* NSLog.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB929907128795A7008E62AD /* NSLog.mm */; };
|
||||
CB929943128795A7008E62AD /* PresentsClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB929908128795A7008E62AD /* PresentsClient.cpp */; };
|
||||
CB929944128795A7008E62AD /* Streamer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB92990E128795A7008E62AD /* Streamer.cpp */; };
|
||||
CB929945128795A7008E62AD /* StringStreamer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB929912128795A7008E62AD /* StringStreamer.cpp */; };
|
||||
CB929946128795A7008E62AD /* Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB929915128795A7008E62AD /* Util.cpp */; };
|
||||
CB929947128795A7008E62AD /* Name.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB929918128795A7008E62AD /* Name.cpp */; };
|
||||
CBEE3AAF1293C6960011359E /* EntryEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CBEE3AAD1293C6960011359E /* EntryEvent.cpp */; };
|
||||
CBEE3AB41293C6A20011359E /* EntryUpdatedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CBEE3AB21293C6A20011359E /* EntryUpdatedEvent.cpp */; };
|
||||
F2B761A7126A554F009DF298 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2B761A2126A5534009DF298 /* CoreFoundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
CB9298AC128795A7008E62AD /* ArrayMask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayMask.cpp; sourceTree = "<group>"; };
|
||||
CB9298AD128795A7008E62AD /* ArrayMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayMask.h; sourceTree = "<group>"; };
|
||||
CB9298AF128795A7008E62AD /* BoxedBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoxedBoolean.cpp; sourceTree = "<group>"; };
|
||||
CB9298B0128795A7008E62AD /* BoxedBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoxedBoolean.h; sourceTree = "<group>"; };
|
||||
CB9298B1128795A7008E62AD /* BoxedByte.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoxedByte.cpp; sourceTree = "<group>"; };
|
||||
CB9298B2128795A7008E62AD /* BoxedByte.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoxedByte.h; sourceTree = "<group>"; };
|
||||
CB9298B3128795A7008E62AD /* BoxedDouble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoxedDouble.cpp; sourceTree = "<group>"; };
|
||||
CB9298B4128795A7008E62AD /* BoxedDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoxedDouble.h; sourceTree = "<group>"; };
|
||||
CB9298B5128795A7008E62AD /* BoxedFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoxedFloat.cpp; sourceTree = "<group>"; };
|
||||
CB9298B6128795A7008E62AD /* BoxedFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoxedFloat.h; sourceTree = "<group>"; };
|
||||
CB9298B7128795A7008E62AD /* BoxedInt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoxedInt.cpp; sourceTree = "<group>"; };
|
||||
CB9298B8128795A7008E62AD /* BoxedInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoxedInt.h; sourceTree = "<group>"; };
|
||||
CB9298B9128795A7008E62AD /* BoxedShort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoxedShort.cpp; sourceTree = "<group>"; };
|
||||
CB9298BA128795A7008E62AD /* BoxedShort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoxedShort.h; sourceTree = "<group>"; };
|
||||
CB9298BB128795A7008E62AD /* boxer.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = boxer.py; sourceTree = "<group>"; };
|
||||
CB9298BC128795A7008E62AD /* ClassMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassMapping.h; sourceTree = "<group>"; };
|
||||
CB9298BE128795A7008E62AD /* Registration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Registration.cpp; sourceTree = "<group>"; };
|
||||
CB9298BF128795A7008E62AD /* Registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Registration.h; sourceTree = "<group>"; };
|
||||
CB9298C1128795A7008E62AD /* ClientObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientObject.cpp; sourceTree = "<group>"; };
|
||||
CB9298C2128795A7008E62AD /* ClientObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientObject.h; sourceTree = "<group>"; };
|
||||
CB9298C3128795A7008E62AD /* InvocationMarshaller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InvocationMarshaller.cpp; sourceTree = "<group>"; };
|
||||
CB9298C4128795A7008E62AD /* InvocationMarshaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvocationMarshaller.h; sourceTree = "<group>"; };
|
||||
CB9298C5128795A7008E62AD /* PermissionPolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PermissionPolicy.cpp; sourceTree = "<group>"; };
|
||||
CB9298C6128795A7008E62AD /* PermissionPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PermissionPolicy.h; sourceTree = "<group>"; };
|
||||
CB9298C7128795A7008E62AD /* RegistrationMarshaller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegistrationMarshaller.cpp; sourceTree = "<group>"; };
|
||||
CB9298C8128795A7008E62AD /* RegistrationMarshaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegistrationMarshaller.h; sourceTree = "<group>"; };
|
||||
CB9298C9128795A7008E62AD /* DisconnectReason.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisconnectReason.h; sourceTree = "<group>"; };
|
||||
CB9298CB128795A7008E62AD /* DEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DEvent.cpp; sourceTree = "<group>"; };
|
||||
CB9298CC128795A7008E62AD /* DEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEvent.h; sourceTree = "<group>"; };
|
||||
CB9298CD128795A7008E62AD /* DObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DObject.cpp; sourceTree = "<group>"; };
|
||||
CB9298CE128795A7008E62AD /* DObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DObject.h; sourceTree = "<group>"; };
|
||||
CB9298CF128795A7008E62AD /* DSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DSet.cpp; sourceTree = "<group>"; };
|
||||
CB9298D0128795A7008E62AD /* DSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSet.h; sourceTree = "<group>"; };
|
||||
CB9298D1128795A7008E62AD /* EntryAddedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EntryAddedEvent.cpp; sourceTree = "<group>"; };
|
||||
CB9298D2128795A7008E62AD /* EntryAddedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntryAddedEvent.h; sourceTree = "<group>"; };
|
||||
CB9298D3128795A7008E62AD /* EntryRemovedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EntryRemovedEvent.cpp; sourceTree = "<group>"; };
|
||||
CB9298D4128795A7008E62AD /* EntryRemovedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntryRemovedEvent.h; sourceTree = "<group>"; };
|
||||
CB9298D5128795A7008E62AD /* InvocationNotificationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InvocationNotificationEvent.cpp; sourceTree = "<group>"; };
|
||||
CB9298D6128795A7008E62AD /* InvocationNotificationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvocationNotificationEvent.h; sourceTree = "<group>"; };
|
||||
CB9298D7128795A7008E62AD /* InvocationRequestEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InvocationRequestEvent.cpp; sourceTree = "<group>"; };
|
||||
CB9298D8128795A7008E62AD /* InvocationRequestEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvocationRequestEvent.h; sourceTree = "<group>"; };
|
||||
CB9298D9128795A7008E62AD /* NamedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NamedEvent.cpp; sourceTree = "<group>"; };
|
||||
CB9298DA128795A7008E62AD /* NamedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedEvent.h; sourceTree = "<group>"; };
|
||||
CB9298DB128795A7008E62AD /* InvocationDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InvocationDecoder.cpp; sourceTree = "<group>"; };
|
||||
CB9298DC128795A7008E62AD /* InvocationDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvocationDecoder.h; sourceTree = "<group>"; };
|
||||
CB9298DE128795A7008E62AD /* FramedInputStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FramedInputStream.cpp; sourceTree = "<group>"; };
|
||||
CB9298DF128795A7008E62AD /* FramedInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FramedInputStream.h; sourceTree = "<group>"; };
|
||||
CB9298E0128795A7008E62AD /* FramingOutputStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FramingOutputStream.cpp; sourceTree = "<group>"; };
|
||||
CB9298E1128795A7008E62AD /* FramingOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FramingOutputStream.h; sourceTree = "<group>"; };
|
||||
CB9298E2128795A7008E62AD /* InputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputStream.h; sourceTree = "<group>"; };
|
||||
CB9298E3128795A7008E62AD /* OutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputStream.h; sourceTree = "<group>"; };
|
||||
CB9298E5128795A7008E62AD /* AuthRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthRequest.cpp; sourceTree = "<group>"; };
|
||||
CB9298E6128795A7008E62AD /* AuthRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthRequest.h; sourceTree = "<group>"; };
|
||||
CB9298E7128795A7008E62AD /* AuthResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthResponse.cpp; sourceTree = "<group>"; };
|
||||
CB9298E8128795A7008E62AD /* AuthResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthResponse.h; sourceTree = "<group>"; };
|
||||
CB9298E9128795A7008E62AD /* AuthResponseData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthResponseData.cpp; sourceTree = "<group>"; };
|
||||
CB9298EA128795A7008E62AD /* AuthResponseData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthResponseData.h; sourceTree = "<group>"; };
|
||||
CB9298EB128795A7008E62AD /* BootstrapData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BootstrapData.cpp; sourceTree = "<group>"; };
|
||||
CB9298EC128795A7008E62AD /* BootstrapData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BootstrapData.h; sourceTree = "<group>"; };
|
||||
CB9298ED128795A7008E62AD /* BootstrapNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BootstrapNotification.cpp; sourceTree = "<group>"; };
|
||||
CB9298EE128795A7008E62AD /* BootstrapNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BootstrapNotification.h; sourceTree = "<group>"; };
|
||||
CB9298EF128795A7008E62AD /* Credentials.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Credentials.cpp; sourceTree = "<group>"; };
|
||||
CB9298F0128795A7008E62AD /* Credentials.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Credentials.h; sourceTree = "<group>"; };
|
||||
CB9298F1128795A7008E62AD /* DownstreamMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DownstreamMessage.cpp; sourceTree = "<group>"; };
|
||||
CB9298F2128795A7008E62AD /* DownstreamMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownstreamMessage.h; sourceTree = "<group>"; };
|
||||
CB9298F3128795A7008E62AD /* EventNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventNotification.cpp; sourceTree = "<group>"; };
|
||||
CB9298F4128795A7008E62AD /* EventNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventNotification.h; sourceTree = "<group>"; };
|
||||
CB9298F5128795A7008E62AD /* ForwardEventRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ForwardEventRequest.cpp; sourceTree = "<group>"; };
|
||||
CB9298F6128795A7008E62AD /* ForwardEventRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForwardEventRequest.h; sourceTree = "<group>"; };
|
||||
CB9298F7128795A7008E62AD /* ObjectResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectResponse.cpp; sourceTree = "<group>"; };
|
||||
CB9298F8128795A7008E62AD /* ObjectResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectResponse.h; sourceTree = "<group>"; };
|
||||
CB9298F9128795A7008E62AD /* PingRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PingRequest.cpp; sourceTree = "<group>"; };
|
||||
CB9298FA128795A7008E62AD /* PingRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingRequest.h; sourceTree = "<group>"; };
|
||||
CB9298FB128795A7008E62AD /* PongResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PongResponse.cpp; sourceTree = "<group>"; };
|
||||
CB9298FC128795A7008E62AD /* PongResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PongResponse.h; sourceTree = "<group>"; };
|
||||
CB9298FD128795A7008E62AD /* UpstreamMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UpstreamMessage.cpp; sourceTree = "<group>"; };
|
||||
CB9298FE128795A7008E62AD /* UpstreamMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpstreamMessage.h; sourceTree = "<group>"; };
|
||||
CB9298FF128795A7008E62AD /* UsernamePasswordCreds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UsernamePasswordCreds.cpp; sourceTree = "<group>"; };
|
||||
CB929900128795A7008E62AD /* UsernamePasswordCreds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UsernamePasswordCreds.h; sourceTree = "<group>"; };
|
||||
CB929901128795A7008E62AD /* ObjectInputStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectInputStream.cpp; sourceTree = "<group>"; };
|
||||
CB929902128795A7008E62AD /* ObjectInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectInputStream.h; sourceTree = "<group>"; };
|
||||
CB929903128795A7008E62AD /* ObjectOutputStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectOutputStream.cpp; sourceTree = "<group>"; };
|
||||
CB929904128795A7008E62AD /* ObjectOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectOutputStream.h; sourceTree = "<group>"; };
|
||||
CB929906128795A7008E62AD /* CFSocketStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFSocketStream.cpp; sourceTree = "<group>"; };
|
||||
CB929907128795A7008E62AD /* NSLog.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NSLog.mm; sourceTree = "<group>"; };
|
||||
CB929908128795A7008E62AD /* PresentsClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PresentsClient.cpp; sourceTree = "<group>"; };
|
||||
CB929909128795A7008E62AD /* PresentsClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentsClient.h; sourceTree = "<group>"; };
|
||||
CB92990A128795A7008E62AD /* PresentsError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentsError.h; sourceTree = "<group>"; };
|
||||
CB92990B128795A7008E62AD /* SocketStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStream.h; sourceTree = "<group>"; };
|
||||
CB92990C128795A7008E62AD /* stable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stable.h; sourceTree = "<group>"; };
|
||||
CB92990D128795A7008E62AD /* Streamable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Streamable.h; sourceTree = "<group>"; };
|
||||
CB92990E128795A7008E62AD /* Streamer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Streamer.cpp; sourceTree = "<group>"; };
|
||||
CB92990F128795A7008E62AD /* Streamer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Streamer.h; sourceTree = "<group>"; };
|
||||
CB929911128795A7008E62AD /* StreamableStreamer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamableStreamer.h; sourceTree = "<group>"; };
|
||||
CB929912128795A7008E62AD /* StringStreamer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringStreamer.cpp; sourceTree = "<group>"; };
|
||||
CB929913128795A7008E62AD /* StringStreamer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringStreamer.h; sourceTree = "<group>"; };
|
||||
CB929914128795A7008E62AD /* VectorStreamer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VectorStreamer.h; sourceTree = "<group>"; };
|
||||
CB929915128795A7008E62AD /* Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util.cpp; sourceTree = "<group>"; };
|
||||
CB929916128795A7008E62AD /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util.h; sourceTree = "<group>"; };
|
||||
CB929918128795A7008E62AD /* Name.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Name.cpp; sourceTree = "<group>"; };
|
||||
CB929919128795A7008E62AD /* Name.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Name.h; sourceTree = "<group>"; };
|
||||
CBEE3AAD1293C6960011359E /* EntryEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EntryEvent.cpp; sourceTree = "<group>"; };
|
||||
CBEE3AAE1293C6960011359E /* EntryEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntryEvent.h; sourceTree = "<group>"; };
|
||||
CBEE3AB21293C6A20011359E /* EntryUpdatedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EntryUpdatedEvent.cpp; sourceTree = "<group>"; };
|
||||
CBEE3AB31293C6A20011359E /* EntryUpdatedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntryUpdatedEvent.h; sourceTree = "<group>"; };
|
||||
D2AAC046055464E500DB518D /* libnarya.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libnarya.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F2B761A2126A5534009DF298 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
F2B761A6126A5549009DF298 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F2B761A7126A554F009DF298 /* CoreFoundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* FModAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298AA128795A7008E62AD /* cpp */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
F2B761A2126A5534009DF298 /* CoreFoundation.framework */,
|
||||
);
|
||||
name = FModAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2AAC046055464E500DB518D /* libnarya.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298AA128795A7008E62AD /* cpp */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298AB128795A7008E62AD /* presents */,
|
||||
CB929917128795A7008E62AD /* util */,
|
||||
);
|
||||
name = cpp;
|
||||
path = src/cpp;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298AB128795A7008E62AD /* presents */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298AC128795A7008E62AD /* ArrayMask.cpp */,
|
||||
CB9298AD128795A7008E62AD /* ArrayMask.h */,
|
||||
CB9298AE128795A7008E62AD /* box */,
|
||||
CB9298BC128795A7008E62AD /* ClassMapping.h */,
|
||||
CB9298BD128795A7008E62AD /* client */,
|
||||
CB9298C0128795A7008E62AD /* data */,
|
||||
CB9298C9128795A7008E62AD /* DisconnectReason.h */,
|
||||
CB9298CA128795A7008E62AD /* dobj */,
|
||||
CB9298DB128795A7008E62AD /* InvocationDecoder.cpp */,
|
||||
CB9298DC128795A7008E62AD /* InvocationDecoder.h */,
|
||||
CB9298DD128795A7008E62AD /* io */,
|
||||
CB9298E4128795A7008E62AD /* net */,
|
||||
CB929901128795A7008E62AD /* ObjectInputStream.cpp */,
|
||||
CB929902128795A7008E62AD /* ObjectInputStream.h */,
|
||||
CB929903128795A7008E62AD /* ObjectOutputStream.cpp */,
|
||||
CB929904128795A7008E62AD /* ObjectOutputStream.h */,
|
||||
CB929905128795A7008E62AD /* platform */,
|
||||
CB929908128795A7008E62AD /* PresentsClient.cpp */,
|
||||
CB929909128795A7008E62AD /* PresentsClient.h */,
|
||||
CB92990A128795A7008E62AD /* PresentsError.h */,
|
||||
CB92990B128795A7008E62AD /* SocketStream.h */,
|
||||
CB92990C128795A7008E62AD /* stable.h */,
|
||||
CB92990D128795A7008E62AD /* Streamable.h */,
|
||||
CB92990E128795A7008E62AD /* Streamer.cpp */,
|
||||
CB92990F128795A7008E62AD /* Streamer.h */,
|
||||
CB929910128795A7008E62AD /* streamers */,
|
||||
CB929915128795A7008E62AD /* Util.cpp */,
|
||||
CB929916128795A7008E62AD /* Util.h */,
|
||||
);
|
||||
path = presents;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298AE128795A7008E62AD /* box */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298AF128795A7008E62AD /* BoxedBoolean.cpp */,
|
||||
CB9298B0128795A7008E62AD /* BoxedBoolean.h */,
|
||||
CB9298B1128795A7008E62AD /* BoxedByte.cpp */,
|
||||
CB9298B2128795A7008E62AD /* BoxedByte.h */,
|
||||
CB9298B3128795A7008E62AD /* BoxedDouble.cpp */,
|
||||
CB9298B4128795A7008E62AD /* BoxedDouble.h */,
|
||||
CB9298B5128795A7008E62AD /* BoxedFloat.cpp */,
|
||||
CB9298B6128795A7008E62AD /* BoxedFloat.h */,
|
||||
CB9298B7128795A7008E62AD /* BoxedInt.cpp */,
|
||||
CB9298B8128795A7008E62AD /* BoxedInt.h */,
|
||||
CB9298B9128795A7008E62AD /* BoxedShort.cpp */,
|
||||
CB9298BA128795A7008E62AD /* BoxedShort.h */,
|
||||
CB9298BB128795A7008E62AD /* boxer.py */,
|
||||
);
|
||||
path = box;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298BD128795A7008E62AD /* client */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298BE128795A7008E62AD /* Registration.cpp */,
|
||||
CB9298BF128795A7008E62AD /* Registration.h */,
|
||||
);
|
||||
path = client;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298C0128795A7008E62AD /* data */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298C1128795A7008E62AD /* ClientObject.cpp */,
|
||||
CB9298C2128795A7008E62AD /* ClientObject.h */,
|
||||
CB9298C3128795A7008E62AD /* InvocationMarshaller.cpp */,
|
||||
CB9298C4128795A7008E62AD /* InvocationMarshaller.h */,
|
||||
CB9298C5128795A7008E62AD /* PermissionPolicy.cpp */,
|
||||
CB9298C6128795A7008E62AD /* PermissionPolicy.h */,
|
||||
CB9298C7128795A7008E62AD /* RegistrationMarshaller.cpp */,
|
||||
CB9298C8128795A7008E62AD /* RegistrationMarshaller.h */,
|
||||
);
|
||||
path = data;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298CA128795A7008E62AD /* dobj */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298CB128795A7008E62AD /* DEvent.cpp */,
|
||||
CB9298CC128795A7008E62AD /* DEvent.h */,
|
||||
CB9298CD128795A7008E62AD /* DObject.cpp */,
|
||||
CB9298CE128795A7008E62AD /* DObject.h */,
|
||||
CB9298CF128795A7008E62AD /* DSet.cpp */,
|
||||
CB9298D0128795A7008E62AD /* DSet.h */,
|
||||
CB9298D1128795A7008E62AD /* EntryAddedEvent.cpp */,
|
||||
CB9298D2128795A7008E62AD /* EntryAddedEvent.h */,
|
||||
CBEE3AAD1293C6960011359E /* EntryEvent.cpp */,
|
||||
CBEE3AAE1293C6960011359E /* EntryEvent.h */,
|
||||
CB9298D3128795A7008E62AD /* EntryRemovedEvent.cpp */,
|
||||
CB9298D4128795A7008E62AD /* EntryRemovedEvent.h */,
|
||||
CBEE3AB21293C6A20011359E /* EntryUpdatedEvent.cpp */,
|
||||
CBEE3AB31293C6A20011359E /* EntryUpdatedEvent.h */,
|
||||
CB9298D5128795A7008E62AD /* InvocationNotificationEvent.cpp */,
|
||||
CB9298D6128795A7008E62AD /* InvocationNotificationEvent.h */,
|
||||
CB9298D7128795A7008E62AD /* InvocationRequestEvent.cpp */,
|
||||
CB9298D8128795A7008E62AD /* InvocationRequestEvent.h */,
|
||||
CB9298D9128795A7008E62AD /* NamedEvent.cpp */,
|
||||
CB9298DA128795A7008E62AD /* NamedEvent.h */,
|
||||
);
|
||||
path = dobj;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298DD128795A7008E62AD /* io */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298DE128795A7008E62AD /* FramedInputStream.cpp */,
|
||||
CB9298DF128795A7008E62AD /* FramedInputStream.h */,
|
||||
CB9298E0128795A7008E62AD /* FramingOutputStream.cpp */,
|
||||
CB9298E1128795A7008E62AD /* FramingOutputStream.h */,
|
||||
CB9298E2128795A7008E62AD /* InputStream.h */,
|
||||
CB9298E3128795A7008E62AD /* OutputStream.h */,
|
||||
);
|
||||
path = io;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB9298E4128795A7008E62AD /* net */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB9298E5128795A7008E62AD /* AuthRequest.cpp */,
|
||||
CB9298E6128795A7008E62AD /* AuthRequest.h */,
|
||||
CB9298E7128795A7008E62AD /* AuthResponse.cpp */,
|
||||
CB9298E8128795A7008E62AD /* AuthResponse.h */,
|
||||
CB9298E9128795A7008E62AD /* AuthResponseData.cpp */,
|
||||
CB9298EA128795A7008E62AD /* AuthResponseData.h */,
|
||||
CB9298EB128795A7008E62AD /* BootstrapData.cpp */,
|
||||
CB9298EC128795A7008E62AD /* BootstrapData.h */,
|
||||
CB9298ED128795A7008E62AD /* BootstrapNotification.cpp */,
|
||||
CB9298EE128795A7008E62AD /* BootstrapNotification.h */,
|
||||
CB9298EF128795A7008E62AD /* Credentials.cpp */,
|
||||
CB9298F0128795A7008E62AD /* Credentials.h */,
|
||||
CB9298F1128795A7008E62AD /* DownstreamMessage.cpp */,
|
||||
CB9298F2128795A7008E62AD /* DownstreamMessage.h */,
|
||||
CB9298F3128795A7008E62AD /* EventNotification.cpp */,
|
||||
CB9298F4128795A7008E62AD /* EventNotification.h */,
|
||||
CB9298F5128795A7008E62AD /* ForwardEventRequest.cpp */,
|
||||
CB9298F6128795A7008E62AD /* ForwardEventRequest.h */,
|
||||
CB9298F7128795A7008E62AD /* ObjectResponse.cpp */,
|
||||
CB9298F8128795A7008E62AD /* ObjectResponse.h */,
|
||||
CB9298F9128795A7008E62AD /* PingRequest.cpp */,
|
||||
CB9298FA128795A7008E62AD /* PingRequest.h */,
|
||||
CB9298FB128795A7008E62AD /* PongResponse.cpp */,
|
||||
CB9298FC128795A7008E62AD /* PongResponse.h */,
|
||||
CB9298FD128795A7008E62AD /* UpstreamMessage.cpp */,
|
||||
CB9298FE128795A7008E62AD /* UpstreamMessage.h */,
|
||||
CB9298FF128795A7008E62AD /* UsernamePasswordCreds.cpp */,
|
||||
CB929900128795A7008E62AD /* UsernamePasswordCreds.h */,
|
||||
);
|
||||
path = net;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB929905128795A7008E62AD /* platform */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB929906128795A7008E62AD /* CFSocketStream.cpp */,
|
||||
CB929907128795A7008E62AD /* NSLog.mm */,
|
||||
);
|
||||
path = platform;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB929910128795A7008E62AD /* streamers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB929911128795A7008E62AD /* StreamableStreamer.h */,
|
||||
CB929912128795A7008E62AD /* StringStreamer.cpp */,
|
||||
CB929913128795A7008E62AD /* StringStreamer.h */,
|
||||
CB929914128795A7008E62AD /* VectorStreamer.h */,
|
||||
);
|
||||
path = streamers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CB929917128795A7008E62AD /* util */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CB929918128795A7008E62AD /* Name.cpp */,
|
||||
CB929919128795A7008E62AD /* Name.h */,
|
||||
);
|
||||
path = util;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D2AAC045055464E500DB518D /* narya */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "narya" */;
|
||||
buildPhases = (
|
||||
D2AAC044055464E500DB518D /* Sources */,
|
||||
F2B761A6126A5549009DF298 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = narya;
|
||||
productName = FModAudio;
|
||||
productReference = D2AAC046055464E500DB518D /* libnarya.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0410;
|
||||
};
|
||||
buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "narya" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* FModAudio */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D2AAC045055464E500DB518D /* narya */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D2AAC044055464E500DB518D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
CB92991A128795A7008E62AD /* ArrayMask.cpp in Sources */,
|
||||
CB92991B128795A7008E62AD /* BoxedBoolean.cpp in Sources */,
|
||||
CB92991C128795A7008E62AD /* BoxedByte.cpp in Sources */,
|
||||
CB92991D128795A7008E62AD /* BoxedDouble.cpp in Sources */,
|
||||
CB92991E128795A7008E62AD /* BoxedFloat.cpp in Sources */,
|
||||
CB92991F128795A7008E62AD /* BoxedInt.cpp in Sources */,
|
||||
CB929920128795A7008E62AD /* BoxedShort.cpp in Sources */,
|
||||
CB929921128795A7008E62AD /* Registration.cpp in Sources */,
|
||||
CB929922128795A7008E62AD /* ClientObject.cpp in Sources */,
|
||||
CB929923128795A7008E62AD /* InvocationMarshaller.cpp in Sources */,
|
||||
CB929924128795A7008E62AD /* PermissionPolicy.cpp in Sources */,
|
||||
CB929925128795A7008E62AD /* RegistrationMarshaller.cpp in Sources */,
|
||||
CB929926128795A7008E62AD /* DEvent.cpp in Sources */,
|
||||
CB929927128795A7008E62AD /* DObject.cpp in Sources */,
|
||||
CB929928128795A7008E62AD /* DSet.cpp in Sources */,
|
||||
CB929929128795A7008E62AD /* EntryAddedEvent.cpp in Sources */,
|
||||
CB92992A128795A7008E62AD /* EntryRemovedEvent.cpp in Sources */,
|
||||
CB92992B128795A7008E62AD /* InvocationNotificationEvent.cpp in Sources */,
|
||||
CB92992C128795A7008E62AD /* InvocationRequestEvent.cpp in Sources */,
|
||||
CB92992D128795A7008E62AD /* NamedEvent.cpp in Sources */,
|
||||
CB92992E128795A7008E62AD /* InvocationDecoder.cpp in Sources */,
|
||||
CB92992F128795A7008E62AD /* FramedInputStream.cpp in Sources */,
|
||||
CB929930128795A7008E62AD /* FramingOutputStream.cpp in Sources */,
|
||||
CB929931128795A7008E62AD /* AuthRequest.cpp in Sources */,
|
||||
CB929932128795A7008E62AD /* AuthResponse.cpp in Sources */,
|
||||
CB929933128795A7008E62AD /* AuthResponseData.cpp in Sources */,
|
||||
CB929934128795A7008E62AD /* BootstrapData.cpp in Sources */,
|
||||
CB929935128795A7008E62AD /* BootstrapNotification.cpp in Sources */,
|
||||
CB929936128795A7008E62AD /* Credentials.cpp in Sources */,
|
||||
CB929937128795A7008E62AD /* DownstreamMessage.cpp in Sources */,
|
||||
CB929938128795A7008E62AD /* EventNotification.cpp in Sources */,
|
||||
CB929939128795A7008E62AD /* ForwardEventRequest.cpp in Sources */,
|
||||
CB92993A128795A7008E62AD /* ObjectResponse.cpp in Sources */,
|
||||
CB92993B128795A7008E62AD /* PingRequest.cpp in Sources */,
|
||||
CB92993C128795A7008E62AD /* PongResponse.cpp in Sources */,
|
||||
CB92993D128795A7008E62AD /* UpstreamMessage.cpp in Sources */,
|
||||
CB92993E128795A7008E62AD /* UsernamePasswordCreds.cpp in Sources */,
|
||||
CB92993F128795A7008E62AD /* ObjectInputStream.cpp in Sources */,
|
||||
CB929940128795A7008E62AD /* ObjectOutputStream.cpp in Sources */,
|
||||
CB929941128795A7008E62AD /* CFSocketStream.cpp in Sources */,
|
||||
CB929942128795A7008E62AD /* NSLog.mm in Sources */,
|
||||
CB929943128795A7008E62AD /* PresentsClient.cpp in Sources */,
|
||||
CB929944128795A7008E62AD /* Streamer.cpp in Sources */,
|
||||
CB929945128795A7008E62AD /* StringStreamer.cpp in Sources */,
|
||||
CB929946128795A7008E62AD /* Util.cpp in Sources */,
|
||||
CB929947128795A7008E62AD /* Name.cpp in Sources */,
|
||||
CBEE3AAF1293C6960011359E /* EntryEvent.cpp in Sources */,
|
||||
CBEE3AB41293C6A20011359E /* EntryUpdatedEvent.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB91EC08733DB70010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(BOOST_ROOT)",
|
||||
./src/cpp,
|
||||
);
|
||||
PRODUCT_NAME = narya;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB91F008733DB70010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/cpp/presents/stable.h;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(BOOST_ROOT)/ThirdParty/boost_1_43_0",
|
||||
./src/cpp,
|
||||
);
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.2;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"-fvisibility=hidden",
|
||||
"-fvisibility-inlines-hidden",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
STRIP_STYLE = debugging;
|
||||
SYMROOT = "dist/xcode-build";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2249D1F81458AA0800205E7C /* Playtest */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_OPTIMIZATION_LEVEL = s;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/cpp/presents/stable.h;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(BOOST_ROOT)/ThirdParty/boost_1_43_0",
|
||||
./src/cpp,
|
||||
);
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.2;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"-fvisibility=hidden",
|
||||
"-fvisibility-inlines-hidden",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
STRIP_STYLE = debugging;
|
||||
SYMROOT = "dist/xcode-build";
|
||||
};
|
||||
name = Playtest;
|
||||
};
|
||||
2249D1F91458AA0800205E7C /* Playtest */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(BOOST_ROOT)",
|
||||
./src/cpp,
|
||||
);
|
||||
PRODUCT_NAME = narya;
|
||||
};
|
||||
name = Playtest;
|
||||
};
|
||||
2249D1FA1458AA0E00205E7C /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_OPTIMIZATION_LEVEL = s;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/cpp/presents/stable.h;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(BOOST_ROOT)/ThirdParty/boost_1_43_0",
|
||||
./src/cpp,
|
||||
);
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.2;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"-fvisibility=hidden",
|
||||
"-fvisibility-inlines-hidden",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
STRIP_STYLE = debugging;
|
||||
SYMROOT = "dist/xcode-build";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
2249D1FB1458AA0E00205E7C /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(BOOST_ROOT)",
|
||||
./src/cpp,
|
||||
);
|
||||
PRODUCT_NAME = narya;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "narya" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB91EC08733DB70010E9CD /* Debug */,
|
||||
2249D1F91458AA0800205E7C /* Playtest */,
|
||||
2249D1FB1458AA0E00205E7C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "narya" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB91F008733DB70010E9CD /* Debug */,
|
||||
2249D1F81458AA0800205E7C /* Playtest */,
|
||||
2249D1FA1458AA0E00205E7C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>narya-parent</artifactId>
|
||||
<version>1.11-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>narya</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Narya Core</name>
|
||||
|
||||
<dependencies>
|
||||
<!-- exported dependencies -->
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>ooo-util</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>jsr250-api</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- optional dependencies -->
|
||||
<dependency>
|
||||
<groupId>com.samskivert</groupId>
|
||||
<artifactId>depot</artifactId>
|
||||
<version>1.5</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>gwt-utils</artifactId>
|
||||
<version>1.5</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- test/build dependencies -->
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-user</artifactId>
|
||||
<version>2.4.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.7.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.10</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- include the source files in our main jar for use by GWT -->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.build.sourceDirectory}</directory>
|
||||
<includes>
|
||||
<include>**/*.gwt.xml</include>
|
||||
<include>**/web/server/*Exception.java</include>
|
||||
<include>**/web/client/*.java</include>
|
||||
<include>**/web/gwt/*.java</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "stable.h"
|
||||
#include "ArrayMask.h"
|
||||
|
||||
ArrayMask::ArrayMask (int length)
|
||||
{
|
||||
_length = length/8;
|
||||
if (length % 8 != 0) {
|
||||
_length++;
|
||||
}
|
||||
_mask = new uint8[_length];
|
||||
}
|
||||
|
||||
ArrayMask::ArrayMask (ObjectInputStream& in)
|
||||
{
|
||||
_length = in.readShort();
|
||||
_mask = new uint8[_length];
|
||||
in.readBytes(_mask, _length);
|
||||
}
|
||||
|
||||
ArrayMask::~ArrayMask()
|
||||
{
|
||||
delete _mask;
|
||||
}
|
||||
|
||||
void ArrayMask::set (int index)
|
||||
{
|
||||
_mask[index/8] |= (1 << (index%8));
|
||||
}
|
||||
|
||||
bool ArrayMask::isSet (int index)
|
||||
{
|
||||
return (_mask[index/8] & (1 << (index%8))) != 0;
|
||||
}
|
||||
|
||||
void ArrayMask::writeTo (ObjectOutputStream& out)
|
||||
{
|
||||
out.writeShort((int16) _length);
|
||||
out.writeBytes(_mask, _length);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "ObjectInputStream.h"
|
||||
#include "ObjectOutputStream.h"
|
||||
|
||||
class ArrayMask
|
||||
{
|
||||
public:
|
||||
ArrayMask (int length);
|
||||
ArrayMask (ObjectInputStream& in);
|
||||
~ArrayMask();
|
||||
void set (int index);
|
||||
bool isSet (int index);
|
||||
void writeTo (ObjectOutputStream& out);
|
||||
protected:
|
||||
uint8* _mask;
|
||||
int _length;
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#pragma once
|
||||
|
||||
struct Streamer;
|
||||
|
||||
struct ClassMapping
|
||||
{
|
||||
int16 code;
|
||||
Streamer* streamer;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace presents
|
||||
{ enum DisconnectReason {
|
||||
NETWORK_DISCONNECT,
|
||||
SERVER_DISCONNECT,
|
||||
CLIENT_CLOSED,
|
||||
SERVER_UNREACHABLE,
|
||||
UNKNOWN
|
||||
};
|
||||
|
||||
typedef boost::signal<void (DisconnectReason)> DisconnectEvent;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "stable.h"
|
||||
#include "InvocationDecoder.h"
|
||||
|
||||
using namespace presents;
|
||||
|
||||
InvocationDecoder::InvocationDecoder(utf8 rcode) :
|
||||
receiverCode(rcode)
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Streamable.h"
|
||||
|
||||
namespace presents
|
||||
{
|
||||
class InvocationDecoder {
|
||||
public:
|
||||
const utf8 receiverCode;
|
||||
InvocationDecoder(utf8 receiverCode);
|
||||
virtual void dispatchNotification(int8 methodId, const std::vector< Shared<Streamable> >& args) = 0;
|
||||
|
||||
private:
|
||||
// not implemented
|
||||
InvocationDecoder (const InvocationDecoder&);
|
||||
InvocationDecoder& operator= (const InvocationDecoder&);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
#include "stable.h"
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "ObjectInputStream.h"
|
||||
#include "PresentsError.h"
|
||||
#include "presents/io/InputStream.h"
|
||||
|
||||
#include "Streamer.h"
|
||||
|
||||
#include "Util.h"
|
||||
bool ObjectInputStream::readBoolean ()
|
||||
{
|
||||
return readByte() != 0;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
template <class T>
|
||||
T readInteger(presents::InputStream* in)
|
||||
{
|
||||
T value;
|
||||
assert(in->read(&value, sizeof(T)) == sizeof(T));
|
||||
return presents::presentsToHost(value);
|
||||
}
|
||||
}
|
||||
|
||||
int8 ObjectInputStream::readByte ()
|
||||
{
|
||||
return readInteger<int8>(_in);
|
||||
}
|
||||
|
||||
int16 ObjectInputStream::readShort ()
|
||||
{
|
||||
return readInteger<int16>(_in);
|
||||
}
|
||||
|
||||
int32 ObjectInputStream::readInt ()
|
||||
{
|
||||
return readInteger<int32>(_in);
|
||||
}
|
||||
|
||||
int64 ObjectInputStream::readLong ()
|
||||
{
|
||||
return readInteger<int64>(_in);
|
||||
}
|
||||
|
||||
void ObjectInputStream::readBytes (uint8* bytes, size_t length)
|
||||
{
|
||||
_in->read(bytes, length);
|
||||
}
|
||||
|
||||
float ObjectInputStream::readFloat ()
|
||||
{
|
||||
float value;
|
||||
readBytes((uint8*) &value, 4);
|
||||
return value;
|
||||
}
|
||||
|
||||
double ObjectInputStream::readDouble ()
|
||||
{
|
||||
double value;
|
||||
readBytes((uint8*) &value, 8);
|
||||
return value;
|
||||
}
|
||||
|
||||
utf8 ObjectInputStream::readUTF ()
|
||||
{
|
||||
uint16 dataLength = readInteger<uint16>(_in);
|
||||
boost::scoped_array<uint8> data(new uint8[dataLength]);
|
||||
readBytes((uint8*)&data[0], dataLength);
|
||||
return std::string((char*)&data[0], dataLength);
|
||||
}
|
||||
|
||||
Shared<void> ObjectInputStream::readObject ()
|
||||
{
|
||||
int16 code = readShort();
|
||||
if (code == 0) {
|
||||
return Shared<void>();
|
||||
}
|
||||
|
||||
Streamer* streamer;
|
||||
if (code < 0) {
|
||||
code *= -1;
|
||||
|
||||
utf8 name = readUTF();
|
||||
|
||||
streamer = getStreamer(name);
|
||||
ClassMapping cmap = { code, streamer };
|
||||
_classMap.insert(_classMap.begin() + code, cmap);
|
||||
|
||||
} else {
|
||||
streamer = (&_classMap[code])->streamer;
|
||||
if (streamer == NULL) {
|
||||
throw PresentsError((boost::format("Unknown streamer code '%1%'") % code).str());
|
||||
}
|
||||
}
|
||||
|
||||
return streamer->createObject(*this);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ClassMapping.h"
|
||||
#include "Streamer.h"
|
||||
|
||||
namespace presents { class InputStream; }
|
||||
|
||||
using namespace presents;
|
||||
|
||||
class ObjectInputStream
|
||||
{
|
||||
public:
|
||||
ObjectInputStream (presents::InputStream* stream) : _in(stream), _classMap(1) { }
|
||||
|
||||
bool readBoolean ();
|
||||
int8 readByte ();
|
||||
int16 readShort ();
|
||||
int32 readInt ();
|
||||
int64 readLong ();
|
||||
void readBytes (uint8* bytes, size_t length);
|
||||
float readFloat ();
|
||||
double readDouble ();
|
||||
utf8 readUTF ();
|
||||
|
||||
Shared<void> readObject ();
|
||||
|
||||
template <typename T>
|
||||
Shared<T> readField ()
|
||||
{
|
||||
return boost::static_pointer_cast<T>(readField(getJavaName((const T*)NULL)));
|
||||
}
|
||||
|
||||
Shared<void> readField (utf8 javaname)
|
||||
{
|
||||
if (readBoolean()) {
|
||||
return getStreamer(javaname)->createObject(*this);
|
||||
} else {
|
||||
return Shared<void>();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
presents::InputStream* _in;
|
||||
typedef std::vector<ClassMapping> ClassMap;
|
||||
ClassMap _classMap;
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
#include "stable.h"
|
||||
|
||||
#include "presents/io/OutputStream.h"
|
||||
#include "ObjectOutputStream.h"
|
||||
|
||||
#include "Streamable.h"
|
||||
#include "Streamer.h"
|
||||
#include "Util.h"
|
||||
|
||||
#pragma warning (disable: 4100) // unreferenced parameter
|
||||
|
||||
using namespace presents;
|
||||
|
||||
namespace {
|
||||
template <class T>
|
||||
static void writeInteger(OutputStream* out, T value)
|
||||
{
|
||||
value = hostToPresents(value);
|
||||
out->write((uint8*)&value, sizeof(value));
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeBoolean (bool value)
|
||||
{
|
||||
writeInteger(_out, (uint8)(value ? 1 : 0));
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeByte (int8 value)
|
||||
{
|
||||
writeInteger(_out, value);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeLong (int64 value)
|
||||
{
|
||||
writeInteger(_out, value);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeInt (int32 value)
|
||||
{
|
||||
writeInteger(_out, value);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeShort (int16 value)
|
||||
{
|
||||
writeInteger(_out, value);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeBytes (const uint8* bytes, size_t length)
|
||||
{
|
||||
_out->write(bytes, length);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeDouble (double value)
|
||||
{
|
||||
_out->write((uint8*) &value, 8);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeFloat (float value)
|
||||
{
|
||||
_out->write((uint8*) &value, 4);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeUTF (const utf8& value)
|
||||
{
|
||||
size_t bytesToWrite = value.size() * sizeof(uint8);
|
||||
writeShort(bytesToWrite);
|
||||
_out->write((uint8*)value.data(), value.size());
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeBareObject (const Shared<void>& object, Streamer* streamer)
|
||||
{
|
||||
streamer->writeObject(object, *this);
|
||||
}
|
||||
|
||||
void ObjectOutputStream::writeField (const Shared<void>& object, const utf8& javaName)
|
||||
{
|
||||
writeBoolean(object != NULL);
|
||||
if (object != NULL) {
|
||||
writeBareObject(object, getStreamer(javaName));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "ClassMapping.h"
|
||||
#include "PresentsError.h"
|
||||
#include "Streamable.h"
|
||||
#include "Streamer.h"
|
||||
|
||||
//interface Streamable;
|
||||
//interface Streamer;
|
||||
|
||||
namespace presents { class OutputStream; }
|
||||
|
||||
using namespace presents;
|
||||
|
||||
class ObjectOutputStream
|
||||
{
|
||||
public:
|
||||
ObjectOutputStream (presents::OutputStream* stream) : _out(stream), _nextClassCode(1) { }
|
||||
|
||||
void writeBoolean (bool value);
|
||||
void writeByte (int8 value);
|
||||
void writeShort (int16 value);
|
||||
void writeInt (int32 value);
|
||||
void writeLong (int64 value);
|
||||
void writeBytes (const uint8* bytes, size_t length);
|
||||
void writeDouble (double value);
|
||||
void writeFloat (float value);
|
||||
void writeUTF (const utf8& value);
|
||||
|
||||
template <typename T>
|
||||
void writeObject (const Shared<T>& object)
|
||||
{
|
||||
if (object.get() == NULL) {
|
||||
writeShort(0);
|
||||
return;
|
||||
}
|
||||
|
||||
const utf8 className = getObjectName(object.get());
|
||||
ClassMap::iterator it = _classMap.find(className);
|
||||
Streamer* streamer;
|
||||
|
||||
if (it == _classMap.end()) {
|
||||
streamer = getStreamer(className);
|
||||
if (streamer == NULL) {
|
||||
throw PresentsError((boost::format("No streamer for '%1%'") % className).str());
|
||||
}
|
||||
|
||||
ClassMapping cmap = { (int16)_nextClassCode++, streamer };
|
||||
assert(_nextClassCode < 32767); // Can't be more than Short.MAX_VALUE
|
||||
_classMap[className] = cmap;
|
||||
|
||||
writeShort(-cmap.code);
|
||||
writeUTF(className);
|
||||
|
||||
} else {
|
||||
ClassMapping* cmap = &(it->second);
|
||||
streamer = cmap->streamer;
|
||||
writeShort(cmap->code);
|
||||
}
|
||||
|
||||
writeBareObject((Shared<void>)object, streamer);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void writeField (const Shared<T>& object)
|
||||
{
|
||||
writeField(object, getJavaName((T*)NULL));
|
||||
}
|
||||
|
||||
void writeField (const Shared<void>& object, const utf8& javaName);
|
||||
|
||||
protected:
|
||||
void writeBareObject (const Shared<void>& object, Streamer* streamer);
|
||||
|
||||
presents::OutputStream* _out;
|
||||
|
||||
typedef std::map<utf8, ClassMapping> ClassMap;
|
||||
ClassMap _classMap;
|
||||
|
||||
int _nextClassCode;
|
||||
};
|
||||
@@ -0,0 +1,256 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#include "presents/stable.h"
|
||||
#include "PresentsClient.h"
|
||||
|
||||
#include "SocketStream.h"
|
||||
#include "ObjectInputStream.h"
|
||||
#include "ObjectOutputStream.h"
|
||||
|
||||
#include "presents/box/BoxedBoolean.h"
|
||||
#include "presents/box/BoxedByte.h"
|
||||
#include "presents/box/BoxedDouble.h"
|
||||
#include "presents/box/BoxedFloat.h"
|
||||
#include "presents/box/BoxedInt.h"
|
||||
#include "presents/box/BoxedShort.h"
|
||||
|
||||
#include "presents/client/Registration.h"
|
||||
|
||||
#include "presents/data/ClientObject.h"
|
||||
#include "presents/data/InvocationMarshaller.h"
|
||||
#include "presents/data/PermissionPolicy.h"
|
||||
#include "presents/data/RegistrationMarshaller.h"
|
||||
|
||||
#include "presents/dobj/DEvent.h"
|
||||
#include "presents/dobj/DObject.h"
|
||||
#include "presents/dobj/DSet.h"
|
||||
#include "presents/dobj/EntryAddedEvent.h"
|
||||
#include "presents/dobj/EntryEvent.h"
|
||||
#include "presents/dobj/EntryRemovedEvent.h"
|
||||
#include "presents/dobj/EntryUpdatedEvent.h"
|
||||
#include "presents/dobj/InvocationNotificationEvent.h"
|
||||
#include "presents/dobj/InvocationRequestEvent.h"
|
||||
#include "presents/dobj/NamedEvent.h"
|
||||
|
||||
#include "presents/io/FramedInputStream.h"
|
||||
#include "presents/io/FramingOutputStream.h"
|
||||
|
||||
#include "presents/net/AuthRequest.h"
|
||||
#include "presents/net/AuthResponse.h"
|
||||
#include "presents/net/AuthResponseData.h"
|
||||
#include "presents/net/BootstrapData.h"
|
||||
#include "presents/net/BootstrapNotification.h"
|
||||
#include "presents/net/Credentials.h"
|
||||
#include "presents/net/DownstreamMessage.h"
|
||||
#include "presents/net/EventNotification.h"
|
||||
#include "presents/net/ForwardEventRequest.h"
|
||||
#include "presents/net/ObjectResponse.h"
|
||||
#include "presents/net/PingRequest.h"
|
||||
#include "presents/net/PongResponse.h"
|
||||
#include "presents/net/UpstreamMessage.h"
|
||||
#include "presents/net/UsernamePasswordCreds.h"
|
||||
|
||||
#include "util/Name.h"
|
||||
|
||||
#include "presents/Util.h"
|
||||
|
||||
using namespace presents;
|
||||
|
||||
PresentsClient::PresentsClient ()
|
||||
: _outMessageId(0)
|
||||
, _nextReceiverId(1)
|
||||
, _oid(-1)
|
||||
, _socket(NULL)
|
||||
, _idleTime(0)
|
||||
, _connected(false)
|
||||
, _active(false)
|
||||
{
|
||||
// ensure all Streamables are not stripped out of the library by clients
|
||||
// (Some of these classes aren't directly referenced by PresentsClient)
|
||||
box::BoxedBoolean::registerWithPresents();
|
||||
box::BoxedByte::registerWithPresents();
|
||||
box::BoxedDouble::registerWithPresents();
|
||||
box::BoxedFloat::registerWithPresents();
|
||||
box::BoxedInt::registerWithPresents();
|
||||
box::BoxedShort::registerWithPresents();
|
||||
|
||||
client::Registration::registerWithPresents();
|
||||
|
||||
data::ClientObject::registerWithPresents();
|
||||
data::InvocationMarshaller::registerWithPresents();
|
||||
data::PermissionPolicy::registerWithPresents();
|
||||
data::RegistrationMarshaller::registerWithPresents();
|
||||
|
||||
dobj::DEvent::registerWithPresents();
|
||||
dobj::DObject::registerWithPresents();
|
||||
dobj::DSet::registerWithPresents();
|
||||
dobj::EntryEvent::registerWithPresents();
|
||||
dobj::EntryAddedEvent::registerWithPresents();
|
||||
dobj::EntryRemovedEvent::registerWithPresents();
|
||||
dobj::EntryUpdatedEvent::registerWithPresents();
|
||||
dobj::InvocationNotificationEvent::registerWithPresents();
|
||||
dobj::InvocationRequestEvent::registerWithPresents();
|
||||
dobj::NamedEvent::registerWithPresents();
|
||||
|
||||
net::AuthRequest::registerWithPresents();
|
||||
net::AuthResponse::registerWithPresents();
|
||||
net::AuthResponseData::registerWithPresents();
|
||||
net::BootstrapData::registerWithPresents();
|
||||
net::BootstrapNotification::registerWithPresents();
|
||||
net::Credentials::registerWithPresents();
|
||||
net::DownstreamMessage::registerWithPresents();
|
||||
net::EventNotification::registerWithPresents();
|
||||
net::ForwardEventRequest::registerWithPresents();
|
||||
net::ObjectResponse::registerWithPresents();
|
||||
net::PingRequest::registerWithPresents();
|
||||
net::PongResponse::registerWithPresents();
|
||||
net::UpstreamMessage::registerWithPresents();
|
||||
net::UsernamePasswordCreds::registerWithPresents();
|
||||
}
|
||||
|
||||
PresentsClient::~PresentsClient ()
|
||||
{
|
||||
}
|
||||
|
||||
bool PresentsClient::isConnected () const
|
||||
{
|
||||
return _connected;
|
||||
}
|
||||
|
||||
void PresentsClient::connect (const std::string& host, int port, Shared<presents::net::Credentials> creds, Shared<utf8> version)
|
||||
{
|
||||
assert(!_active);
|
||||
assert(!_onSocketDisconnect.connected());
|
||||
_active = true;
|
||||
_socket.reset(createSocketStream(host.c_str(), port));
|
||||
_onSocketDisconnect = _socket->onDisconnect(boost::bind(&PresentsClient::handleDisconnect, this, _1));
|
||||
_framedIn.reset(new FramedInputStream(_socket.get()));
|
||||
_framingOut.reset(new FramingOutputStream(_socket.get()));
|
||||
_in.reset(new ObjectInputStream(_framedIn.get()));
|
||||
_out.reset(new ObjectOutputStream(_framingOut.get()));
|
||||
|
||||
Shared<net::AuthRequest> req(new net::AuthRequest);
|
||||
req->version = version;
|
||||
req->zone = Shared<utf8>(new utf8(""));
|
||||
|
||||
req->creds = creds;
|
||||
req->bootGroups = Shared< std::vector< Shared<utf8> > >(new std::vector< Shared<utf8> >);
|
||||
req->bootGroups->push_back(Shared<utf8>(new utf8("client")));
|
||||
PLOG("Connecting to %s:%d", host.c_str(), port);
|
||||
postMessage(req);
|
||||
}
|
||||
|
||||
void PresentsClient::disconnect ()
|
||||
{
|
||||
if (_active) {
|
||||
_socket->close();
|
||||
}
|
||||
}
|
||||
|
||||
void PresentsClient::update (float dt)
|
||||
{
|
||||
if (!_active) {
|
||||
return;
|
||||
}
|
||||
_socket->update(dt);
|
||||
if (!_active) {
|
||||
// Update can inform of uf a disconnect through onDisconnect, which shuts us down.
|
||||
return;
|
||||
}
|
||||
while (_framedIn->readFrame()) {
|
||||
Shared<Streamable> obj = boost::static_pointer_cast<Streamable>(_in->readObject());
|
||||
if (obj == NULL) {
|
||||
PLOG("Got null message? What the dickens?");
|
||||
continue;
|
||||
}
|
||||
const utf8& msgName = obj->getJavaClassName();
|
||||
if (msgName == net::AuthResponse::javaName()) {
|
||||
Shared<net::AuthResponse> resp = boost::static_pointer_cast<net::AuthResponse>(obj);
|
||||
PLOG("Got auth response from corpseserver: %s", resp->data->code->c_str());
|
||||
_onAuth(*resp->data);
|
||||
} else if (msgName == net::BootstrapNotification::javaName()) {
|
||||
PLOG("Got bootstrap");
|
||||
Shared<net::BootstrapNotification> strap = boost::static_pointer_cast<net::BootstrapNotification>(obj);
|
||||
_oid = strap->data->clientOid;
|
||||
typedef std::vector< Shared<data::InvocationMarshaller> > MarshVec;
|
||||
Shared<MarshVec> services(strap->data->services);
|
||||
for (MarshVec::iterator iter = services->begin(); iter != services->end(); ++iter) {
|
||||
_services.insert(MarshallerMap::value_type((*iter)->getJavaClassName(), *iter));
|
||||
}
|
||||
_connected = true;
|
||||
_onConnected(this);
|
||||
} else if (msgName == net::EventNotification::javaName()) {
|
||||
Shared<dobj::DEvent> event = boost::static_pointer_cast<net::EventNotification>(obj)->event;
|
||||
if (event->getJavaClassName() == dobj::InvocationNotificationEvent::javaName()) {
|
||||
Shared<dobj::InvocationNotificationEvent> notification = boost::static_pointer_cast<dobj::InvocationNotificationEvent>(event);
|
||||
DecoderMap::iterator it = _decoders.find(notification->receiverId);
|
||||
it->second->dispatchNotification(notification->methodId, *notification->args);
|
||||
} else {
|
||||
PLOG("Ignoring event %s", event->getJavaClassName().c_str());
|
||||
}
|
||||
} else {
|
||||
PLOG("Ignoring message %s", msgName.c_str());
|
||||
}
|
||||
if (!_active) {
|
||||
// The client may decide to disconnect as a result of reading the message, in which case we need to stop reading.
|
||||
return;
|
||||
}
|
||||
}
|
||||
_idleTime += dt;
|
||||
if (!_connected) {
|
||||
if (_idleTime > 30) {
|
||||
handleDisconnect(SERVER_UNREACHABLE);
|
||||
}
|
||||
} else if (_idleTime > 60) {
|
||||
Shared<net::PingRequest> ping(new net::PingRequest());
|
||||
postMessage(ping);
|
||||
}
|
||||
}
|
||||
|
||||
void PresentsClient::postMessage (Shared<net::UpstreamMessage> message)
|
||||
{
|
||||
if (!_active) {
|
||||
PLOG("PresentsClient::postMessage called while not connected!");
|
||||
} else {
|
||||
message->messageId = _outMessageId++;
|
||||
_out->writeObject(message);
|
||||
_framingOut->writeFrame();
|
||||
_idleTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void PresentsClient::sendRequest (int32 invOid, int32 invCode, int8 methId, const Shared< std::vector< Shared<Streamable> > >& args)
|
||||
{
|
||||
Shared<dobj::InvocationRequestEvent> req(new dobj::InvocationRequestEvent);
|
||||
req->toid = invOid;
|
||||
req->invCode = invCode;
|
||||
req->methodId = methId;
|
||||
req->args = args;
|
||||
Shared<net::ForwardEventRequest> forward(new net::ForwardEventRequest);
|
||||
forward->event = req;
|
||||
postMessage(forward);
|
||||
}
|
||||
|
||||
|
||||
void PresentsClient::handleDisconnect (DisconnectReason reason)
|
||||
{
|
||||
PLOG("PresentsClient::handleDisconnect");
|
||||
_active = false;
|
||||
_socket.reset();
|
||||
_in.reset();
|
||||
_out.reset();
|
||||
_framedIn.reset();
|
||||
_framingOut.reset();
|
||||
_oid = -1;
|
||||
_decoders.clear();
|
||||
_services.clear();
|
||||
_onSocketDisconnect.disconnect();
|
||||
_connected = false;
|
||||
_onDisconnected(reason);
|
||||
}
|
||||
|
||||
Shared<PresentsClient> PresentsClient::getSharedThis()
|
||||
{
|
||||
return shared_from_this();
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "presents/InvocationDecoder.h"
|
||||
#include "presents/DisconnectReason.h"
|
||||
#include "presents/PresentsError.h"
|
||||
#include "presents/client/Registration.h"
|
||||
#include "presents/data/RegistrationMarshaller.h"
|
||||
|
||||
class ObjectInputStream;
|
||||
class ObjectOutputStream;
|
||||
|
||||
namespace presents
|
||||
{
|
||||
namespace data { class InvocationMarshaller; }
|
||||
namespace net {
|
||||
class AuthResponseData;
|
||||
class Credentials;
|
||||
class UpstreamMessage;
|
||||
}
|
||||
class FramedInputStream;
|
||||
class FramingOutputStream;
|
||||
class SocketStream;
|
||||
|
||||
class PresentsClient : public boost::enable_shared_from_this<PresentsClient>
|
||||
{
|
||||
protected:
|
||||
typedef std::map<utf8, Shared<data::InvocationMarshaller> > MarshallerMap;
|
||||
typedef std::map<int16, Shared<InvocationDecoder> > DecoderMap;
|
||||
|
||||
public:
|
||||
typedef boost::signal<void (PresentsClient*)> ClientEvent;
|
||||
typedef boost::signal<void (const net::AuthResponseData&)> AuthFailureEvent;
|
||||
|
||||
PresentsClient ();
|
||||
virtual ~PresentsClient ();
|
||||
|
||||
void update (float dt);
|
||||
|
||||
template <typename T>
|
||||
Shared<T> requireService ()
|
||||
{
|
||||
MarshallerMap::iterator it = _services.find(T::javaName());
|
||||
if (it->second == NULL) {
|
||||
throw PresentsError((boost::format("No marshaller for %1%") % T::javaName()).str());
|
||||
}
|
||||
return boost::static_pointer_cast<T>(it->second);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void registerReceiver (Shared<T> receiver)
|
||||
{
|
||||
assert(_socket != NULL);
|
||||
Shared<presents::client::Registration> reg(new presents::client::Registration);
|
||||
reg->receiverId = _nextReceiverId++;
|
||||
Shared<InvocationDecoder> dec(new typename T::Decoder(receiver));
|
||||
reg->receiverCode = Shared<utf8>(new utf8(dec->receiverCode));
|
||||
_decoders.insert(DecoderMap::value_type(reg->receiverId, dec));
|
||||
requireService<presents::data::RegistrationMarshaller>()->registerReceiver(getSharedThis(), reg);
|
||||
}
|
||||
|
||||
bool isConnected () const;
|
||||
void connect (const std::string& hostname, int port, Shared<presents::net::Credentials> creds, Shared<utf8> version);
|
||||
void disconnect ();
|
||||
|
||||
void postMessage (Shared<presents::net::UpstreamMessage> msg);
|
||||
void sendRequest (int32 invOid, int32 invCode, int8 methodId, const Shared< std::vector< Shared<Streamable> > >& args);
|
||||
int getOid() const { assert(_oid != -1); return _oid; }
|
||||
|
||||
connection_t onConnected (const ClientEvent::slot_type& slot) {
|
||||
return _onConnected.connect(slot);
|
||||
}
|
||||
|
||||
connection_t onDisconnected (const DisconnectEvent::slot_type& slot) {
|
||||
return _onDisconnected.connect(slot);
|
||||
}
|
||||
|
||||
connection_t onAuth (const AuthFailureEvent::slot_type& slot) {
|
||||
return _onAuth.connect(slot);
|
||||
}
|
||||
|
||||
protected:
|
||||
void handleDisconnect (DisconnectReason);
|
||||
Shared<PresentsClient> getSharedThis();
|
||||
|
||||
boost::scoped_ptr<SocketStream> _socket;
|
||||
boost::scoped_ptr<FramingOutputStream> _framingOut;
|
||||
boost::scoped_ptr<FramedInputStream> _framedIn;
|
||||
boost::scoped_ptr<ObjectInputStream> _in;
|
||||
boost::scoped_ptr<ObjectOutputStream> _out;
|
||||
int16 _outMessageId;
|
||||
int16 _nextReceiverId;
|
||||
int32 _oid;
|
||||
DecoderMap _decoders;
|
||||
MarshallerMap _services;
|
||||
float _idleTime;
|
||||
|
||||
// If the connection to the presents server is authenticated and ready to go. _onConnected is
|
||||
// signaled when this becomes true
|
||||
bool _connected;
|
||||
|
||||
// If we're connected or are trying to connect. This is always true when _connected is true,
|
||||
// but also before the connection is authed and before the bootstrap data arrives.
|
||||
bool _active;
|
||||
|
||||
ClientEvent _onConnected;
|
||||
DisconnectEvent _onDisconnected;
|
||||
AuthFailureEvent _onAuth;
|
||||
|
||||
connection_t _onSocketDisconnect;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace presents
|
||||
{
|
||||
class PresentsError : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
PresentsError(const std::string& message) : std::runtime_error(message)
|
||||
{}
|
||||
|
||||
virtual ~PresentsError() throw()
|
||||
{}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "DisconnectReason.h"
|
||||
#include "io/InputStream.h"
|
||||
#include "io/OutputStream.h"
|
||||
|
||||
namespace presents {
|
||||
class SocketStream : public InputStream, public OutputStream
|
||||
{
|
||||
public:
|
||||
virtual ~SocketStream() {};
|
||||
virtual void close () = 0;
|
||||
virtual void update (float dt) = 0;
|
||||
virtual connection_t onDisconnect (const DisconnectEvent::slot_type& slot) = 0;
|
||||
};
|
||||
|
||||
SocketStream* createSocketStream (const char* hostname, int port);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#pragma once
|
||||
|
||||
class ObjectOutputStream;
|
||||
class ObjectInputStream;
|
||||
|
||||
struct Streamable
|
||||
{
|
||||
virtual void writeObject (ObjectOutputStream& out) const = 0;
|
||||
virtual void readObject (ObjectInputStream& in) = 0;
|
||||
virtual const utf8& getJavaClassName () const = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
#include "stable.h"
|
||||
#include "Streamer.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "ObjectInputStream.h"
|
||||
#include "ObjectOutputStream.h"
|
||||
#include "PresentsError.h"
|
||||
|
||||
#include "streamers/StringStreamer.h"
|
||||
#include "streamers/StreamableStreamer.h"
|
||||
#include "streamers/VectorStreamer.h"
|
||||
|
||||
#include "Util.h"
|
||||
|
||||
class StreamerMap
|
||||
{
|
||||
private:
|
||||
typedef std::map<utf8, Streamer*> Map;
|
||||
|
||||
public:
|
||||
void insert (const utf8& javaName, Streamer* streamer)
|
||||
{
|
||||
_map[javaName] = streamer;
|
||||
}
|
||||
|
||||
Streamer* get (const utf8& javaName)
|
||||
{
|
||||
Map::iterator it = _map.find(javaName);
|
||||
if (it == _map.end()) {
|
||||
throw PresentsError((boost::format("Unable to find Streamer for %1%") % javaName).str());
|
||||
}
|
||||
return it->second;
|
||||
}
|
||||
|
||||
~StreamerMap ()
|
||||
{
|
||||
for (Map::iterator iter = _map.begin(); iter != _map.end(); ++iter) {
|
||||
delete iter->second;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
Map _map;
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
template <typename T>
|
||||
void registerPrimitiveArrayStreamer (StreamerMap& map)
|
||||
{
|
||||
map.insert(getJavaName((const std::vector<T>*)NULL), new VectorStreamer<T>());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void registerObjectArrayStreamer (StreamerMap& map)
|
||||
{
|
||||
map.insert(getJavaName<>((std::vector< Shared<T> >*)NULL), new VectorStreamer<T>());
|
||||
}
|
||||
}
|
||||
|
||||
StreamerMap* getMap ()
|
||||
{
|
||||
static bool gInited = false;
|
||||
static StreamerMap gMap;
|
||||
|
||||
if (!gInited) {
|
||||
gInited = true;
|
||||
|
||||
gMap.insert(getJavaName((utf8*)NULL), new StringStreamer());
|
||||
gMap.insert(JAVA_LIST_NAME(), new VectorStreamer< Streamable >());
|
||||
|
||||
registerObjectArrayStreamer<Streamable>(gMap);
|
||||
registerObjectArrayStreamer<utf8>(gMap);
|
||||
|
||||
registerPrimitiveArrayStreamer<int8>(gMap);
|
||||
registerPrimitiveArrayStreamer<int16>(gMap);
|
||||
registerPrimitiveArrayStreamer<int32>(gMap);
|
||||
registerPrimitiveArrayStreamer<int64>(gMap);
|
||||
registerPrimitiveArrayStreamer<float>(gMap);
|
||||
registerPrimitiveArrayStreamer<double>(gMap);
|
||||
registerPrimitiveArrayStreamer<bool>(gMap);
|
||||
}
|
||||
|
||||
return &gMap;
|
||||
}
|
||||
|
||||
void registerStreamer (const utf8& javaName, Streamer* streamer)
|
||||
{
|
||||
getMap()->insert(javaName, streamer);
|
||||
}
|
||||
|
||||
Streamer* getStreamer (const utf8& javaName)
|
||||
{
|
||||
return getMap()->get(javaName);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <boost/type_traits.hpp>
|
||||
#include "Streamable.h"
|
||||
|
||||
static inline utf8 JAVA_LIST_NAME () { return "java.util.ArrayList"; }
|
||||
|
||||
class ObjectOutputStream;
|
||||
class ObjectInputStream;
|
||||
|
||||
struct Streamer
|
||||
{
|
||||
virtual Shared<void> createObject (ObjectInputStream& in) = 0;
|
||||
virtual void writeObject (const Shared<void>& object, ObjectOutputStream& out) = 0;
|
||||
};
|
||||
|
||||
Streamer* getStreamer (const utf8& javaName);
|
||||
void registerStreamer (const utf8& javaName, Streamer* streamer);
|
||||
|
||||
inline const utf8 getJavaName (const utf8*)
|
||||
{
|
||||
return "java.lang.String";
|
||||
}
|
||||
|
||||
inline const utf8 getJavaName (const int8*)
|
||||
{
|
||||
return "B";
|
||||
}
|
||||
|
||||
inline const utf8 getJavaName (const int16*)
|
||||
{
|
||||
return "S";
|
||||
}
|
||||
|
||||
inline const utf8 getJavaName (const int32*)
|
||||
{
|
||||
return "I";
|
||||
}
|
||||
|
||||
inline const utf8 getJavaName (const int64*)
|
||||
{
|
||||
return "J";
|
||||
}
|
||||
|
||||
inline const utf8 getJavaName (const bool*)
|
||||
{
|
||||
return "Z";
|
||||
}
|
||||
|
||||
inline const utf8 getJavaName (const float*)
|
||||
{
|
||||
return "F";
|
||||
}
|
||||
|
||||
inline const utf8 getJavaName (const double*)
|
||||
{
|
||||
return "D";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const utf8 getJavaName (const Shared<T>*)
|
||||
{
|
||||
return getJavaName((const T*)NULL);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const utf8 getJavaName (const std::vector<T>*)
|
||||
{
|
||||
return "[" + getJavaName((const T*)NULL);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const utf8 getJavaName (const std::vector< Shared<T> >*)
|
||||
{
|
||||
return "[L" + getJavaName((const T*)NULL) + ";";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const utf8 getJavaName (const T*)
|
||||
{
|
||||
return T::javaName();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline const utf8 getJavaName<Streamable> (const Streamable*)
|
||||
{
|
||||
return "java.lang.Object";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const utf8 getObjectName (T* object)
|
||||
{
|
||||
if (boost::is_base_of<Streamable, T>::value) {
|
||||
// Look up the object's class virtually
|
||||
return ((Streamable*)object)->getJavaClassName();
|
||||
} else {
|
||||
// Everything else is assumed to be a final class
|
||||
return getJavaName(object);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "Util.h"
|
||||
|
||||
void presents::internal::log(const char* format, ...)
|
||||
{
|
||||
va_list argumentList;
|
||||
va_start(argumentList, format);
|
||||
|
||||
char buffer[1024];
|
||||
#ifdef PRESENTS_COMPILER_MSVC
|
||||
if (_vsnprintf(buffer, 1024, format, argumentList) > 0) {
|
||||
#else
|
||||
if (vsprintf(buffer, format, argumentList) > 0) {
|
||||
#endif
|
||||
presents::log(buffer);
|
||||
}
|
||||
|
||||
va_end(argumentList);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
namespace presents {
|
||||
void log (const char* message);
|
||||
|
||||
namespace internal {
|
||||
void log (const char* format, ...);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T reverseBytes (T source)
|
||||
{
|
||||
uint8* pData = reinterpret_cast<uint8*>(&source);
|
||||
std::reverse(pData, pData + sizeof(T));
|
||||
return source;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T presentsToHost (T source)
|
||||
{
|
||||
#ifdef PRESENTS_HOST_LITTLE_ENDIAN
|
||||
return reverseBytes(source);
|
||||
#else
|
||||
return source;
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T hostToPresents (T source)
|
||||
{
|
||||
#ifdef PRESENTS_HOST_LITTLE_ENDIAN
|
||||
return reverseBytes(source);
|
||||
#else
|
||||
return source;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BoxedBoolean.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
using namespace presents::box;
|
||||
|
||||
DEFINE_STREAMABLE("java.lang.Boolean", BoxedBoolean);
|
||||
|
||||
void BoxedBoolean::readObject (ObjectInputStream& in)
|
||||
{
|
||||
value = in.readBoolean();
|
||||
}
|
||||
|
||||
void BoxedBoolean::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeBoolean(value);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace box {
|
||||
class BoxedBoolean : public Streamable{
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
bool value;
|
||||
|
||||
static Shared<BoxedBoolean> createShared (bool value)
|
||||
{
|
||||
Shared<BoxedBoolean> shared(new BoxedBoolean);
|
||||
shared->value = value;
|
||||
return shared;
|
||||
}
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BoxedByte.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
using namespace presents::box;
|
||||
|
||||
DEFINE_STREAMABLE("java.lang.Byte", BoxedByte);
|
||||
|
||||
void BoxedByte::readObject (ObjectInputStream& in)
|
||||
{
|
||||
value = in.readByte();
|
||||
}
|
||||
|
||||
void BoxedByte::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeByte(value);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace box {
|
||||
class BoxedByte : public Streamable{
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int8 value;
|
||||
|
||||
static Shared<BoxedByte> createShared (int8 value)
|
||||
{
|
||||
Shared<BoxedByte> shared(new BoxedByte);
|
||||
shared->value = value;
|
||||
return shared;
|
||||
}
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BoxedDouble.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
using namespace presents::box;
|
||||
|
||||
DEFINE_STREAMABLE("java.lang.Double", BoxedDouble);
|
||||
|
||||
void BoxedDouble::readObject (ObjectInputStream& in)
|
||||
{
|
||||
value = in.readDouble();
|
||||
}
|
||||
|
||||
void BoxedDouble::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeDouble(value);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace box {
|
||||
class BoxedDouble : public Streamable{
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
double value;
|
||||
|
||||
static Shared<BoxedDouble> createShared (double value)
|
||||
{
|
||||
Shared<BoxedDouble> shared(new BoxedDouble);
|
||||
shared->value = value;
|
||||
return shared;
|
||||
}
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BoxedFloat.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
using namespace presents::box;
|
||||
|
||||
DEFINE_STREAMABLE("java.lang.Float", BoxedFloat);
|
||||
|
||||
void BoxedFloat::readObject (ObjectInputStream& in)
|
||||
{
|
||||
value = in.readFloat();
|
||||
}
|
||||
|
||||
void BoxedFloat::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeFloat(value);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace box {
|
||||
class BoxedFloat : public Streamable{
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
float value;
|
||||
|
||||
static Shared<BoxedFloat> createShared (float value)
|
||||
{
|
||||
Shared<BoxedFloat> shared(new BoxedFloat);
|
||||
shared->value = value;
|
||||
return shared;
|
||||
}
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BoxedInt.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
using namespace presents::box;
|
||||
|
||||
DEFINE_STREAMABLE("java.lang.Integer", BoxedInt);
|
||||
|
||||
void BoxedInt::readObject (ObjectInputStream& in)
|
||||
{
|
||||
value = in.readInt();
|
||||
}
|
||||
|
||||
void BoxedInt::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeInt(value);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace box {
|
||||
class BoxedInt : public Streamable{
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int32 value;
|
||||
|
||||
static Shared<BoxedInt> createShared (int32 value)
|
||||
{
|
||||
Shared<BoxedInt> shared(new BoxedInt);
|
||||
shared->value = value;
|
||||
return shared;
|
||||
}
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BoxedShort.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
using namespace presents::box;
|
||||
|
||||
DEFINE_STREAMABLE("java.lang.Short", BoxedShort);
|
||||
|
||||
void BoxedShort::readObject (ObjectInputStream& in)
|
||||
{
|
||||
value = in.readShort();
|
||||
}
|
||||
|
||||
void BoxedShort::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeShort(value);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace box {
|
||||
class BoxedShort : public Streamable{
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int16 value;
|
||||
|
||||
static Shared<BoxedShort> createShared (int16 value)
|
||||
{
|
||||
Shared<BoxedShort> shared(new BoxedShort);
|
||||
shared->value = value;
|
||||
return shared;
|
||||
}
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,55 @@
|
||||
primitives = [("Int", "int32", "Integer"),
|
||||
("Short", "int16", "Short"),
|
||||
("Byte", "int8", "Byte"),
|
||||
("Boolean", "bool", "Boolean"),
|
||||
("Double", "double", "Double"),
|
||||
("Float", "float", "Float")]
|
||||
for interpreter, cpptype, javatype in primitives:
|
||||
header = open("Boxed" + interpreter + ".h", 'w')
|
||||
header.write('''#pragma once
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace box {
|
||||
class Boxed%(interpreter)s : public Streamable{
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
%(cpptype)s value;
|
||||
|
||||
static Shared<Boxed%(interpreter)s> createShared (%(cpptype)s value)
|
||||
{
|
||||
Shared<Boxed%(interpreter)s> shared(new Boxed%(interpreter)s);
|
||||
shared->value = value;
|
||||
return shared;
|
||||
}
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
}}''' % locals())
|
||||
header.close()
|
||||
impl = open("Boxed" + interpreter + ".cpp", "w")
|
||||
impl.write('''#include "presents/stable.h"
|
||||
#include "Boxed%(interpreter)s.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
// Generated by running python boxer.py in this directory
|
||||
|
||||
using namespace presents::box;
|
||||
|
||||
DEFINE_STREAMABLE("java.lang.%(javatype)s", Boxed%(interpreter)s);
|
||||
|
||||
void Boxed%(interpreter)s::readObject (ObjectInputStream& in)
|
||||
{
|
||||
value = in.read%(interpreter)s();
|
||||
}
|
||||
|
||||
void Boxed%(interpreter)s::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.write%(interpreter)s(value);
|
||||
}
|
||||
''' % locals())
|
||||
impl.close()
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "Registration.h"
|
||||
|
||||
using namespace presents::client;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.client.InvocationReceiver$Registration", Registration);
|
||||
|
||||
void Registration::readObject (ObjectInputStream& in)
|
||||
{
|
||||
receiverCode = in.readField< utf8 >();
|
||||
receiverId = int16(in.readShort());
|
||||
}
|
||||
|
||||
void Registration::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeField(receiverCode);
|
||||
out.writeShort(receiverId);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents { namespace client {
|
||||
|
||||
class Registration : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<utf8> receiverCode;
|
||||
int16 receiverId;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "presents/stable.h"
|
||||
#include "ClientObject.h"
|
||||
|
||||
using namespace presents::data;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.data.ClientObject", ClientObject);
|
||||
|
||||
void ClientObject::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::DObject::readObject(in);
|
||||
username = boost::static_pointer_cast<util::Name>(in.readObject());
|
||||
receivers = boost::static_pointer_cast<presents::dobj::DSet>(in.readObject());
|
||||
}
|
||||
|
||||
void ClientObject::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::DObject::writeObject(out);
|
||||
out.writeObject(username);
|
||||
out.writeObject(receivers);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/DObject.h"
|
||||
#include "presents/dobj/DSet.h"
|
||||
#include "util/Name.h"
|
||||
|
||||
namespace presents { namespace data {
|
||||
|
||||
class ClientObject : public presents::dobj::DObject {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<util::Name> username;
|
||||
Shared<presents::dobj::DSet> receivers;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "InvocationMarshaller.h"
|
||||
|
||||
using namespace presents::data;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.data.InvocationMarshaller", InvocationMarshaller);
|
||||
|
||||
void InvocationMarshaller::readObject (ObjectInputStream& in)
|
||||
{
|
||||
invOid = int32(in.readInt());
|
||||
invCode = int32(in.readInt());
|
||||
}
|
||||
|
||||
void InvocationMarshaller::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeInt(invOid);
|
||||
out.writeInt(invCode);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents {
|
||||
|
||||
class PresentsClient;
|
||||
|
||||
namespace data {
|
||||
|
||||
class InvocationMarshaller : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int32 invOid;
|
||||
int32 invCode;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "presents/stable.h"
|
||||
#include "PermissionPolicy.h"
|
||||
|
||||
using namespace presents::data;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.data.PermissionPolicy", PermissionPolicy);
|
||||
|
||||
void PermissionPolicy::readObject (ObjectInputStream& /*in*/)
|
||||
{
|
||||
}
|
||||
|
||||
void PermissionPolicy::writeObject (ObjectOutputStream& /*out*/) const
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents { namespace data {
|
||||
|
||||
class PermissionPolicy : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2012 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://code.google.com/p/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published
|
||||
// by the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#include "presents/stable.h"
|
||||
#include "RegistrationMarshaller.h"
|
||||
#include "presents/PresentsClient.h"
|
||||
|
||||
using namespace presents::data;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.data.RegistrationMarshaller", RegistrationMarshaller);
|
||||
|
||||
void RegistrationMarshaller::registerReceiver (Shared<presents::PresentsClient> client, Shared<presents::client::Registration> arg1)
|
||||
{
|
||||
typedef std::vector< Shared<Streamable> > StreamableList;
|
||||
Shared<StreamableList> args(new StreamableList);
|
||||
args->push_back(arg1);
|
||||
args->push_back(getSharedThis());
|
||||
client->sendRequest(invOid, invCode, 1, args);
|
||||
}
|
||||
|
||||
Shared<RegistrationMarshaller> RegistrationMarshaller::getSharedThis()
|
||||
{
|
||||
return shared_from_this();
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2012 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://code.google.com/p/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published
|
||||
// by the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/data/InvocationMarshaller.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include "presents/client/Registration.h"
|
||||
|
||||
namespace presents { namespace data {
|
||||
|
||||
class RegistrationMarshaller : public presents::data::InvocationMarshaller, public boost::enable_shared_from_this<RegistrationMarshaller> {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
virtual ~RegistrationMarshaller () {}
|
||||
|
||||
void registerReceiver (Shared<presents::PresentsClient> client, Shared<presents::client::Registration> arg1);
|
||||
protected:
|
||||
Shared<RegistrationMarshaller> getSharedThis();
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "presents/stable.h"
|
||||
#include "DEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.DEvent", DEvent);
|
||||
|
||||
void DEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
toid = int32(in.readInt());
|
||||
}
|
||||
|
||||
void DEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeInt(toid);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class DEvent : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int32 toid;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "presents/stable.h"
|
||||
#include "DObject.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.DObject", DObject);
|
||||
|
||||
void DObject::readObject (ObjectInputStream& in)
|
||||
{
|
||||
oid = int32(in.readInt());
|
||||
}
|
||||
|
||||
void DObject::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeInt(oid);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class DObject : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int32 oid;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "presents/stable.h"
|
||||
#include "DSet.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.DSet", DSet);
|
||||
|
||||
void DSet::readObject (ObjectInputStream& in)
|
||||
{
|
||||
size = in.readInt();
|
||||
entries = Shared<std::vector< Shared <Streamable> > >(new std::vector< Shared <Streamable> >(size));
|
||||
for (int ii = 0; ii < size; ii++) {
|
||||
(*entries)[ii] = boost::static_pointer_cast<Streamable>(in.readObject());
|
||||
}
|
||||
}
|
||||
|
||||
void DSet::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeInt(size);
|
||||
out.writeField(entries);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class DSet : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared< std::vector< Shared<Streamable> > > entries;
|
||||
int32 size;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "EntryAddedEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.EntryAddedEvent", EntryAddedEvent);
|
||||
|
||||
void EntryAddedEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::EntryEvent::readObject(in);
|
||||
entry = boost::static_pointer_cast<Streamable>(in.readObject());
|
||||
}
|
||||
|
||||
void EntryAddedEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::EntryEvent::writeObject(out);
|
||||
out.writeObject(entry);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/dobj/EntryEvent.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class EntryAddedEvent : public presents::dobj::EntryEvent {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<Streamable> entry;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "presents/stable.h"
|
||||
#include "EntryEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.EntryEvent", EntryEvent);
|
||||
|
||||
void EntryEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::NamedEvent::readObject(in);
|
||||
}
|
||||
|
||||
void EntryEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::NamedEvent::writeObject(out);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/NamedEvent.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class EntryEvent : public presents::dobj::NamedEvent {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "EntryRemovedEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.EntryRemovedEvent", EntryRemovedEvent);
|
||||
|
||||
void EntryRemovedEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::EntryEvent::readObject(in);
|
||||
key = boost::static_pointer_cast<Streamable>(in.readObject());
|
||||
}
|
||||
|
||||
void EntryRemovedEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::EntryEvent::writeObject(out);
|
||||
out.writeObject(key);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/dobj/EntryEvent.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class EntryRemovedEvent : public presents::dobj::EntryEvent {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<Streamable> key;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "EntryUpdatedEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.EntryUpdatedEvent", EntryUpdatedEvent);
|
||||
|
||||
void EntryUpdatedEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::EntryEvent::readObject(in);
|
||||
entry = boost::static_pointer_cast<Streamable>(in.readObject());
|
||||
}
|
||||
|
||||
void EntryUpdatedEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::EntryEvent::writeObject(out);
|
||||
out.writeObject(entry);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/dobj/EntryEvent.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class EntryUpdatedEvent : public presents::dobj::EntryEvent {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<Streamable> entry;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,22 @@
|
||||
#include "presents/stable.h"
|
||||
#include "InvocationNotificationEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.InvocationNotificationEvent", InvocationNotificationEvent);
|
||||
|
||||
void InvocationNotificationEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::DEvent::readObject(in);
|
||||
receiverId = int16(in.readShort());
|
||||
methodId = int8(in.readByte());
|
||||
args = in.readField< std::vector< Shared<Streamable> > >();
|
||||
}
|
||||
|
||||
void InvocationNotificationEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::DEvent::writeObject(out);
|
||||
out.writeShort(receiverId);
|
||||
out.writeByte(methodId);
|
||||
out.writeField(args);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/DEvent.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class InvocationNotificationEvent : public presents::dobj::DEvent {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int16 receiverId;
|
||||
int8 methodId;
|
||||
Shared< std::vector< Shared<Streamable> > > args;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,22 @@
|
||||
#include "presents/stable.h"
|
||||
#include "InvocationRequestEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.InvocationRequestEvent", InvocationRequestEvent);
|
||||
|
||||
void InvocationRequestEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::DEvent::readObject(in);
|
||||
invCode = int32(in.readInt());
|
||||
methodId = int8(in.readByte());
|
||||
args = in.readField< std::vector< Shared<Streamable> > >();
|
||||
}
|
||||
|
||||
void InvocationRequestEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::DEvent::writeObject(out);
|
||||
out.writeInt(invCode);
|
||||
out.writeByte(methodId);
|
||||
out.writeField(args);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/DEvent.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class InvocationRequestEvent : public presents::dobj::DEvent {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int32 invCode;
|
||||
int8 methodId;
|
||||
Shared< std::vector< Shared<Streamable> > > args;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "NamedEvent.h"
|
||||
|
||||
using namespace presents::dobj;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.dobj.NamedEvent", NamedEvent);
|
||||
|
||||
void NamedEvent::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::DEvent::readObject(in);
|
||||
name = in.readField< utf8 >();
|
||||
}
|
||||
|
||||
void NamedEvent::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::DEvent::writeObject(out);
|
||||
out.writeField(name);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/DEvent.h"
|
||||
|
||||
namespace presents { namespace dobj {
|
||||
|
||||
class NamedEvent : public presents::dobj::DEvent {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<utf8> name;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,63 @@
|
||||
#include "FramedInputStream.h"
|
||||
|
||||
#include "presents/stable.h"
|
||||
|
||||
#include "presents/PresentsError.h"
|
||||
#include "presents/Util.h"
|
||||
#include "FramedInputStream.h"
|
||||
#include "InputStream.h"
|
||||
|
||||
using namespace presents;
|
||||
|
||||
static const int READ_BUFFER_LENGTH = 4096;
|
||||
|
||||
FramedInputStream::FramedInputStream (InputStream* base)
|
||||
: _base(base)
|
||||
, _length(-1)
|
||||
, _fillPosition(0)
|
||||
, _readPosition(0)
|
||||
, _readBufferLength(READ_BUFFER_LENGTH)
|
||||
, _readBuffer(new uint8[READ_BUFFER_LENGTH])
|
||||
{
|
||||
}
|
||||
|
||||
// Returns bytes read
|
||||
size_t FramedInputStream::read (void* pData, size_t bytesToRead)
|
||||
{
|
||||
if (_fillPosition != _length) {
|
||||
throw PresentsError("Attempted to read with no frame!");
|
||||
}
|
||||
if ((int32) (_readPosition + bytesToRead) > _length) {
|
||||
throw PresentsError("Attempted to read past frame!");
|
||||
}
|
||||
memcpy(pData, &_readBuffer[_readPosition], bytesToRead);
|
||||
_readPosition += bytesToRead;
|
||||
return bytesToRead;
|
||||
}
|
||||
|
||||
bool FramedInputStream::readFrame ()
|
||||
{
|
||||
if (_length == _fillPosition) {
|
||||
if (_fillPosition != _readPosition) {
|
||||
throw PresentsError("Attempted to read new frame without consuming old one");
|
||||
}
|
||||
_length = -1;
|
||||
_fillPosition = _readPosition = 0;
|
||||
}
|
||||
if (_length == -1) {
|
||||
_fillPosition += _base->read(&_readBuffer[_fillPosition], 4 - _fillPosition);
|
||||
if (_fillPosition == 4) {
|
||||
_length = ((_readBuffer[0] << 24) | (_readBuffer[1] << 16) | (_readBuffer[2] << 8) | _readBuffer[3]) - 4;
|
||||
if (_length > _readBufferLength) {
|
||||
_readBufferLength *= 2;
|
||||
_readBuffer.reset(new uint8[_readBufferLength]);
|
||||
PLOG("Thas a mighty big frame. Musta been feedin' him corn. Growing buffer to %d", _readBufferLength);
|
||||
}
|
||||
_fillPosition = 0;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
_fillPosition += _base->read(&_readBuffer[_fillPosition], _length - _fillPosition);
|
||||
return _fillPosition == _length;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "InputStream.h"
|
||||
|
||||
namespace presents {
|
||||
|
||||
class FramedInputStream : public InputStream
|
||||
{
|
||||
public:
|
||||
FramedInputStream (InputStream* base);
|
||||
virtual size_t read(void* pData, size_t bytesToRead);
|
||||
bool readFrame ();
|
||||
protected:
|
||||
int32 _length;
|
||||
InputStream* _base;
|
||||
boost::scoped_array<uint8> _readBuffer;
|
||||
int32 _fillPosition, _readPosition, _readBufferLength;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#include "presents/stable.h"
|
||||
#include "FramingOutputStream.h"
|
||||
|
||||
#include "presents/Util.h"
|
||||
|
||||
using namespace presents;
|
||||
|
||||
FramingOutputStream::FramingOutputStream (OutputStream* base)
|
||||
: _base(base)
|
||||
{}
|
||||
|
||||
// Returns bytes written
|
||||
size_t FramingOutputStream::write(const uint8* pData, size_t bytesToWrite)
|
||||
{
|
||||
uint8* bytes = (uint8*)pData;
|
||||
for (int ii = 0; ii < bytesToWrite; ii++) {
|
||||
_frameBuffer.push_back(bytes[ii]);
|
||||
}
|
||||
return bytesToWrite;
|
||||
}
|
||||
|
||||
|
||||
void FramingOutputStream::writeFrame()
|
||||
{
|
||||
int32 length = hostToPresents((int32)(_frameBuffer.size() + sizeof(int32)));
|
||||
_base->write((uint8*)&length, sizeof(int32));
|
||||
_base->write(&_frameBuffer[0], _frameBuffer.size());
|
||||
|
||||
_frameBuffer.clear();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "OutputStream.h"
|
||||
|
||||
namespace presents {
|
||||
|
||||
class FramingOutputStream : public OutputStream {
|
||||
public:
|
||||
FramingOutputStream (OutputStream* base);
|
||||
|
||||
// Returns bytes written
|
||||
virtual size_t write (const uint8* pData, size_t bytesToWrite);
|
||||
void writeFrame ();
|
||||
|
||||
protected:
|
||||
OutputStream* _base;
|
||||
std::vector<uint8> _frameBuffer;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
namespace presents {
|
||||
class InputStream {
|
||||
public:
|
||||
virtual ~InputStream() {};
|
||||
virtual size_t read(void* pData, size_t bytesToRead) = 0;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
namespace presents {
|
||||
class OutputStream {
|
||||
public:
|
||||
virtual ~OutputStream() {};
|
||||
virtual size_t write(const uint8* pData, size_t bytesToWrite) = 0;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "presents/stable.h"
|
||||
#include "AuthRequest.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.AuthRequest", AuthRequest);
|
||||
|
||||
void AuthRequest::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::UpstreamMessage::readObject(in);
|
||||
creds = boost::static_pointer_cast<presents::net::Credentials>(in.readObject());
|
||||
version = in.readField< utf8 >();
|
||||
zone = in.readField< utf8 >();
|
||||
bootGroups = boost::static_pointer_cast< std::vector< Shared<utf8> > >(in.readObject());
|
||||
}
|
||||
|
||||
void AuthRequest::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::UpstreamMessage::writeObject(out);
|
||||
out.writeObject(creds);
|
||||
out.writeField(version);
|
||||
out.writeField(zone);
|
||||
out.writeObject(bootGroups);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/net/Credentials.h"
|
||||
#include "presents/net/UpstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class AuthRequest : public presents::net::UpstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<presents::net::Credentials> creds;
|
||||
Shared<utf8> version;
|
||||
Shared<utf8> zone;
|
||||
Shared< std::vector< Shared<utf8> > > bootGroups;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "AuthResponse.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.AuthResponse", AuthResponse);
|
||||
|
||||
void AuthResponse::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::DownstreamMessage::readObject(in);
|
||||
data = boost::static_pointer_cast<presents::net::AuthResponseData>(in.readObject());
|
||||
}
|
||||
|
||||
void AuthResponse::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::DownstreamMessage::writeObject(out);
|
||||
out.writeObject(data);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/net/AuthResponseData.h"
|
||||
#include "presents/net/DownstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class AuthResponse : public presents::net::DownstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<presents::net::AuthResponseData> data;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "AuthResponseData.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.AuthResponseData", AuthResponseData);
|
||||
|
||||
void AuthResponseData::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::DObject::readObject(in);
|
||||
code = in.readField< utf8 >();
|
||||
}
|
||||
|
||||
void AuthResponseData::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::DObject::writeObject(out);
|
||||
out.writeField(code);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/DObject.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class AuthResponseData : public presents::dobj::DObject {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<utf8> code;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BootstrapData.h"
|
||||
#include "presents/Streamer.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.BootstrapData", BootstrapData);
|
||||
|
||||
void BootstrapData::readObject (ObjectInputStream& in)
|
||||
{
|
||||
connectionId = int32(in.readInt());
|
||||
clientOid = int32(in.readInt());
|
||||
services = boost::static_pointer_cast< std::vector< Shared<presents::data::InvocationMarshaller> > >(in.readField(JAVA_LIST_NAME()));
|
||||
}
|
||||
|
||||
void BootstrapData::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeInt(connectionId);
|
||||
out.writeInt(clientOid);
|
||||
out.writeField(services, JAVA_LIST_NAME());
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/data/InvocationMarshaller.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class BootstrapData : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int32 connectionId;
|
||||
int32 clientOid;
|
||||
Shared< std::vector< Shared<presents::data::InvocationMarshaller> > > services;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "BootstrapNotification.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.BootstrapNotification", BootstrapNotification);
|
||||
|
||||
void BootstrapNotification::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::DownstreamMessage::readObject(in);
|
||||
data = boost::static_pointer_cast<presents::net::BootstrapData>(in.readObject());
|
||||
}
|
||||
|
||||
void BootstrapNotification::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::DownstreamMessage::writeObject(out);
|
||||
out.writeObject(data);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/net/BootstrapData.h"
|
||||
#include "presents/net/DownstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class BootstrapNotification : public presents::net::DownstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<presents::net::BootstrapData> data;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "presents/stable.h"
|
||||
#include "Credentials.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.Credentials", Credentials);
|
||||
|
||||
void Credentials::readObject (ObjectInputStream& /*in*/)
|
||||
{
|
||||
}
|
||||
|
||||
void Credentials::writeObject (ObjectOutputStream& /*out*/) const
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class Credentials : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "presents/stable.h"
|
||||
#include "DownstreamMessage.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.DownstreamMessage", DownstreamMessage);
|
||||
|
||||
void DownstreamMessage::readObject (ObjectInputStream& in)
|
||||
{
|
||||
messageId = int16(in.readShort());
|
||||
}
|
||||
|
||||
void DownstreamMessage::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeShort(messageId);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class DownstreamMessage : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int16 messageId;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "EventNotification.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.EventNotification", EventNotification);
|
||||
|
||||
void EventNotification::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::DownstreamMessage::readObject(in);
|
||||
event = boost::static_pointer_cast<presents::dobj::DEvent>(in.readObject());
|
||||
}
|
||||
|
||||
void EventNotification::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::DownstreamMessage::writeObject(out);
|
||||
out.writeObject(event);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/DEvent.h"
|
||||
#include "presents/net/DownstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class EventNotification : public presents::net::DownstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<presents::dobj::DEvent> event;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "ForwardEventRequest.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.ForwardEventRequest", ForwardEventRequest);
|
||||
|
||||
void ForwardEventRequest::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::UpstreamMessage::readObject(in);
|
||||
event = boost::static_pointer_cast<presents::dobj::DEvent>(in.readObject());
|
||||
}
|
||||
|
||||
void ForwardEventRequest::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::UpstreamMessage::writeObject(out);
|
||||
out.writeObject(event);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/dobj/DEvent.h"
|
||||
#include "presents/net/UpstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class ForwardEventRequest : public presents::net::UpstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<presents::dobj::DEvent> event;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "presents/stable.h"
|
||||
#include "ObjectResponse.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.ObjectResponse", ObjectResponse);
|
||||
|
||||
void ObjectResponse::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::DownstreamMessage::readObject(in);
|
||||
dobj = boost::static_pointer_cast<Streamable>(in.readObject());
|
||||
}
|
||||
|
||||
void ObjectResponse::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::DownstreamMessage::writeObject(out);
|
||||
out.writeObject(dobj);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/net/DownstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class ObjectResponse : public presents::net::DownstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<Streamable> dobj;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "presents/stable.h"
|
||||
#include "PingRequest.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.PingRequest", PingRequest);
|
||||
|
||||
void PingRequest::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::UpstreamMessage::readObject(in);
|
||||
}
|
||||
|
||||
void PingRequest::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::UpstreamMessage::writeObject(out);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/net/UpstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class PingRequest : public presents::net::UpstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "presents/stable.h"
|
||||
#include "PongResponse.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.PongResponse", PongResponse);
|
||||
|
||||
void PongResponse::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::DownstreamMessage::readObject(in);
|
||||
packStamp = int64(in.readLong());
|
||||
processDelay = int32(in.readInt());
|
||||
}
|
||||
|
||||
void PongResponse::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::DownstreamMessage::writeObject(out);
|
||||
out.writeLong(packStamp);
|
||||
out.writeInt(processDelay);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/net/DownstreamMessage.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class PongResponse : public presents::net::DownstreamMessage {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int64 packStamp;
|
||||
int32 processDelay;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "presents/stable.h"
|
||||
#include "UpstreamMessage.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.UpstreamMessage", UpstreamMessage);
|
||||
|
||||
void UpstreamMessage::readObject (ObjectInputStream& in)
|
||||
{
|
||||
messageId = int16(in.readShort());
|
||||
}
|
||||
|
||||
void UpstreamMessage::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
out.writeShort(messageId);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class UpstreamMessage : public Streamable {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
int16 messageId;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "presents/stable.h"
|
||||
#include "UsernamePasswordCreds.h"
|
||||
|
||||
using namespace presents::net;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.net.UsernamePasswordCreds", UsernamePasswordCreds);
|
||||
|
||||
void UsernamePasswordCreds::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::net::Credentials::readObject(in);
|
||||
username = boost::static_pointer_cast<util::Name>(in.readObject());
|
||||
password = in.readField< utf8 >();
|
||||
}
|
||||
|
||||
void UsernamePasswordCreds::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::net::Credentials::writeObject(out);
|
||||
out.writeObject(username);
|
||||
out.writeField(password);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "presents/Streamable.h"
|
||||
#include "presents/ObjectInputStream.h"
|
||||
#include "presents/ObjectOutputStream.h"
|
||||
#include "presents/streamers/StreamableStreamer.h"
|
||||
|
||||
#include "presents/net/Credentials.h"
|
||||
#include "util/Name.h"
|
||||
|
||||
namespace presents { namespace net {
|
||||
|
||||
class UsernamePasswordCreds : public presents::net::Credentials {
|
||||
public:
|
||||
DECLARE_STREAMABLE();
|
||||
|
||||
Shared<util::Name> username;
|
||||
Shared<utf8> password;
|
||||
|
||||
virtual void readObject(ObjectInputStream& in);
|
||||
virtual void writeObject(ObjectOutputStream& out) const;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,187 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#include "presents/stable.h"
|
||||
#include "presents/SocketStream.h"
|
||||
#include "presents/Util.h"
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CFNetwork/CFNetwork.h>
|
||||
|
||||
namespace presents
|
||||
{
|
||||
|
||||
class CFSocketStream : public SocketStream
|
||||
{
|
||||
public:
|
||||
CFSocketStream (const CFStringRef hostname, int port)
|
||||
: _reader(NULL)
|
||||
, _writer(NULL)
|
||||
{
|
||||
CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, hostname, port, &_reader, &_writer);
|
||||
CFReadStreamOpen(_reader);
|
||||
CFWriteStreamOpen(_writer);
|
||||
}
|
||||
|
||||
virtual ~CFSocketStream ()
|
||||
{
|
||||
CloseWithReason(CLIENT_CLOSED, "Destroyed!");
|
||||
}
|
||||
|
||||
// Returns bytes read
|
||||
virtual size_t read (void* pData, size_t bytesToRead)
|
||||
{
|
||||
if (_reader == NULL) {
|
||||
PLOG("Attempted to read from closed stream!");
|
||||
return 0;
|
||||
}
|
||||
switch (CFReadStreamGetStatus(_reader)) {
|
||||
case kCFStreamStatusClosed:
|
||||
CloseWithReason(SERVER_DISCONNECT, "Server closed our read connection");
|
||||
return 0;
|
||||
case kCFStreamStatusError:
|
||||
HandleStreamError(CFReadStreamCopyError(_reader));
|
||||
return 0;
|
||||
}
|
||||
if (CFReadStreamHasBytesAvailable(_reader)) {
|
||||
int read = CFReadStreamRead(_reader, (UInt8*)pData, bytesToRead);
|
||||
if (read < 0) {
|
||||
PLOG("Got error while reading!");
|
||||
HandleStreamError(CFReadStreamCopyError(_reader));
|
||||
return 0;
|
||||
} else if (read == 0 && CFReadStreamGetStatus(_reader) == kCFStreamStatusAtEnd) {
|
||||
// Only disconnect due to end-of-stream if the stream thinks there should be data
|
||||
CloseWithReason(SERVER_DISCONNECT, "Hit read stream end");
|
||||
}
|
||||
return read;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Returns bytes written
|
||||
virtual size_t write (const uint8* pData, size_t bytesToWrite)
|
||||
{
|
||||
if (_writer == NULL) {
|
||||
PLOG("Attempted to write to closed stream!");
|
||||
return 0;
|
||||
}
|
||||
uint8* bytes = (uint8*)pData;
|
||||
for (int ii = 0; ii < bytesToWrite; ii++) {
|
||||
_writerBuffer.push_back(bytes[ii]);
|
||||
}
|
||||
return bytesToWrite;
|
||||
}
|
||||
|
||||
virtual void update (float dt)
|
||||
{
|
||||
if (_writer == NULL) {
|
||||
PLOG("Attempted to write to closed stream!");
|
||||
return;
|
||||
}
|
||||
switch (CFWriteStreamGetStatus(_writer)) {
|
||||
case kCFStreamStatusClosed:
|
||||
CloseWithReason(SERVER_DISCONNECT, "Server closed our write connection");
|
||||
return;
|
||||
case kCFStreamStatusAtEnd:
|
||||
CloseWithReason(SERVER_DISCONNECT, "Hit write stream end");
|
||||
return;
|
||||
case kCFStreamStatusError:
|
||||
HandleStreamError(CFWriteStreamCopyError(_writer));
|
||||
return;
|
||||
}
|
||||
while (!_writerBuffer.empty() && CFWriteStreamCanAcceptBytes(_writer)) {
|
||||
int written = CFWriteStreamWrite(_writer, (UInt8*)&_writerBuffer[0], _writerBuffer.size());
|
||||
if (written < 0) {
|
||||
PLOG("Hit error in write!");
|
||||
HandleStreamError(CFWriteStreamCopyError(_writer));
|
||||
} else {
|
||||
_writerBuffer.erase(_writerBuffer.begin(), _writerBuffer.begin() + written);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void close ()
|
||||
{
|
||||
CloseWithReason(CLIENT_CLOSED, "Client requested close");
|
||||
}
|
||||
|
||||
virtual connection_t onDisconnect (const DisconnectEvent::slot_type& slot)
|
||||
{
|
||||
return _onDisconnected.connect(slot);
|
||||
}
|
||||
|
||||
protected:
|
||||
void CloseWithReason (presents::DisconnectReason why, const std::string& detail)
|
||||
{
|
||||
if (_reader == NULL) {
|
||||
return;// Multiple closes don't hurt nobody
|
||||
}
|
||||
PLOG("Closing stream: %s", detail.c_str());
|
||||
CFReadStreamClose(_reader);
|
||||
CFRelease(_reader);
|
||||
_reader = NULL;
|
||||
CFWriteStreamClose(_writer);
|
||||
CFRelease(_writer);
|
||||
_writer = NULL;
|
||||
PLOG("Signaling disconnected");
|
||||
_onDisconnected(why);
|
||||
}
|
||||
|
||||
void HandleStreamError (CFErrorRef error)
|
||||
{
|
||||
if (CFErrorGetDomain(error) == kCFErrorDomainPOSIX) {
|
||||
switch (CFErrorGetCode(error)) {
|
||||
case ENETDOWN:
|
||||
CloseWithReason(NETWORK_DISCONNECT, "Net down!");
|
||||
break;
|
||||
case ENETUNREACH:
|
||||
CloseWithReason(NETWORK_DISCONNECT, "Net unreachable");
|
||||
break;
|
||||
case ENETRESET:
|
||||
CloseWithReason(NETWORK_DISCONNECT, "Net reset");
|
||||
break;
|
||||
case ECONNRESET:
|
||||
CloseWithReason(NETWORK_DISCONNECT, "Net connection reset");
|
||||
break;
|
||||
case EHOSTDOWN:
|
||||
CloseWithReason(SERVER_UNREACHABLE, "host down!");
|
||||
break;
|
||||
case EHOSTUNREACH:
|
||||
CloseWithReason(SERVER_UNREACHABLE, "host unreachable!");
|
||||
break;
|
||||
case ECONNREFUSED:
|
||||
CloseWithReason(SERVER_UNREACHABLE, "connection refused");
|
||||
break;
|
||||
case EPIPE:
|
||||
CloseWithReason(SERVER_DISCONNECT, "broken pipe");
|
||||
break;
|
||||
case ENOTCONN:
|
||||
CloseWithReason(SERVER_DISCONNECT, "not connected");
|
||||
break;
|
||||
default:
|
||||
PLOG("Unknown posix net error: %d", CFErrorGetCode(error));
|
||||
CloseWithReason(NETWORK_DISCONNECT, "Unknown failure!");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
PLOG("Unknown CFStreamError domain: domain: %s error: %d", CFErrorGetDomain(error), CFErrorGetCode(error));
|
||||
CloseWithReason(UNKNOWN, "CFStream error");
|
||||
}
|
||||
CFRelease(error);
|
||||
}
|
||||
|
||||
CFWriteStreamRef _writer;
|
||||
std::vector<uint8> _writerBuffer;
|
||||
CFReadStreamRef _reader;
|
||||
DisconnectEvent _onDisconnected;
|
||||
};
|
||||
|
||||
SocketStream* createSocketStream (const char* hostname, int port)
|
||||
{
|
||||
CFStringRef cfHostname = CFStringCreateWithCString(kCFAllocatorDefault, hostname,
|
||||
kCFStringEncodingMacRoman);
|
||||
CFSocketStream* stream = new CFSocketStream(cfHostname, port);
|
||||
CFRelease(cfHostname);
|
||||
return stream;
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user