Commit Graph

5614 Commits

Author SHA1 Message Date
Bruno Garcia 6e6895d32d Ignore updates to fields that weren't defined by this class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6329 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-12-02 02:35:23 +00:00
Bruno Garcia b660861be3 In an effort to make DObject updates easier to react to in actionscript, gendobj now generates
signals for each field that can be listened to individually.

From the old:

barrel.addListener(new AttributeChangeAdapter(function (event :AttributeChangedEvent) :void {
    if (event.getName() == BarrelObject.MONKEY_COUNT) {
        // ... cast event.getValue() and use it
    }
}));

to the new:

barrel.onMonkeyCountChanged.add(function (newValue :int, oldValue :int) :void {
    // ...
});


Only AttributeChangedEvent have been signalified, but I'm planning to continue with the other
ChangeListeners shortly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6328 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-12-02 02:25:35 +00:00
Andrzej Kapolka cfbf5a742c Hey, that's not a string!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-12-02 00:31:03 +00:00
Mike Thomas 7f765020a9 Since we're in the middle of reporting a failure, this can be due to an already-disappeared client-obj. If so, let's not NPE and just log a nice friendly null.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6325 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-12-02 00:17:02 +00:00
Par Winzell 4c0224f835 Break success notification out into its own method. This lets me call it separately, and mastches reportFailure() quite elegantly besides.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6324 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-12-01 15:04:11 +00:00
Tom Conkling be72e5cdad Add support for ActionScript Set streaming
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6323 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-12-01 03:00:52 +00:00
Par Winzell eb9e0db930 MDB reassures me it's safe to assume the client is a CrowdClient here, which makes the function short enough to inline. Also rename _auxobj to _bodyobj.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 19:07:56 +00:00
Michael Bayne 22288e0b4c Match our changes on the ActionScript side.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6321 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 18:47:10 +00:00
Michael Bayne 9c9129a796 We can't use the type systesm to enforce our requirements, but we can use
obtain containment and a stack of specifically typed outer class references to
accomplish what we need without misleading casts.

This will require changes to Yohoho which I shall make forthwith.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6320 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 18:35:58 +00:00
Michael Bayne 99795a972c A couple of things:
1. CrowdPermissionPolicy is an object that lives inside a BodyObject, thus it
cannot use server services like dependency injection, nor BodyLocator. However,
that's not a problem because it will never be used by a ClientObject that is
not a BodyObject. If there were a way to enforce with parameterized types that
it only ever be used in conjunction with a BodyObject, I'd do that, but
parallel inheritance hierarchies are not something that any OO type system I'm
aware of can reason about.

2. ClientResolver and its children are not singletons. One is created for each
client resolution process.

I have certainly fallen prey to the same errors during enthusiastic reactions:
it looks like a rose, it has thorns like a rose, oh wait, it's a blackberry.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6319 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 18:18:27 +00:00
Michael Bayne e5b7cd1535 I'm going to operate on the assumption that if you're separating ClientObject
from BodyObject, then it's your responsibility to make sure that your
BodyObject carries your Crowd permissions. Checking the ClientObject for your
Crowd permissions and then using those on your (separate) BodyObject is too
weird.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 18:05:00 +00:00
Par Winzell 7af21e2aa0 Recent server-side work has tried to evolve away from the assumption that the ClientObject you log in with is necessarily the BodyObject you drive around the world.
This client-side commit matches the new BodyLocator.forClient() method on the server by the addition of CrowdClient.bodyOf(), which should be subclassed by anyone who wants to do anything fancy.

The default implementation is just for the client to cast itself to BodyObject, matching the default (and historical) implementation in BodyLocator.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6317 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 16:38:38 +00:00
Charlie Groves ff1254dc37 Whoops, can't have writeObject methods in actionscript DObjects
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6316 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 02:50:32 +00:00
Charlie Groves 5a3694aa6f Separate GenActionScriptStreamableTask from GenActionScriptTask and add dobject support to GenActionScriptStreamableTask
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6315 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 02:39:12 +00:00
Charlie Groves 220b7a28b5 Add the actionscript streamable generator
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6314 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 01:53:02 +00:00
Par Winzell 0fc64e3f76 Let's try that again. Sigh. I miss you, Mercurial.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 01:26:59 +00:00
Par Winzell 73e63125eb Oops, did not mean to commit those extra bits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6312 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 01:25:58 +00:00
Par Winzell 3146ca071e Well, that took a while to track down. Both the permissions check and the validation need to be done on the body, not the client.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6311 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 01:23:59 +00:00
Par Winzell 9572a8464d Didn't end up injecting these after all.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-30 01:22:59 +00:00
Par Winzell 19a8763518 Leave some backwards compatibility leniency in here, since it appears there's code out there that instantiates SpeakHandlers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6309 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-29 21:25:40 +00:00
Par Winzell b9dfc6902e Stop assuming that the ClientObject we log in with is also the BodyObject we walk around with. This patch removes lots of casts strewn about and replaces them with calls to a new function on BodyLocator, which should be subclassed and overridden by those who wish to venture in these new exciting waters.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6308 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-29 21:10:57 +00:00
Charlie Groves c4d108b1f7 Bind on all interfaces and allow connections from any host
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-25 01:35:06 +00:00
Charlie Groves c0fb9e52c1 Credentials aren't required to create a Client
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6306 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-25 01:32:35 +00:00
Andrzej Kapolka 4e4dbc3862 Break deserialization out into its own method so that we can override it
elsewhere.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6305 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-25 00:16:36 +00:00
Andrzej Kapolka 902a4027ea Tweaks to allow serializing config attributes other than DSets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6304 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-25 00:03:52 +00:00
Charlie Groves 8e5865995c * Add a static method to init and run a PresentsServer given guice modules with its configuration.
* Rename PrefixServer.Module classes to PrefixModule.  They all implement guice's Module, and it's
  hard to pass a class around as its interface if they share a name.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-23 22:19:01 +00:00
Andrzej Kapolka 80233b31a1 Include the attribute clear in the compound event. We're getting some weird
errors with duplicate receiver entries on reconnect in Spiral Knights, and
I'm hoping this will fix them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6301 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-23 21:13:41 +00:00
Nathan Curtis c4cb01db9f Fix this template.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6300 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-23 19:54:12 +00:00
Charlie Groves 8f04fe102d We're not restricting things to a set of ports, so don't act like we're going to.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6299 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-23 02:29:26 +00:00
Mike Thomas e0ea50b97d We don't need this unchecked bit anymore, since we're using the cast() method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-23 01:18:02 +00:00
Mike Thomas b26d2268ca We need this cast() method on InvocationListener too since that's getting used that way in genservice.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6297 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-23 01:02:23 +00:00
Michael Bayne 34722f2ce9 Obtain our ActionScript dependencies from Maven as well, and publish our swc
artifacts thereto.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6289 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-18 20:50:09 +00:00
Michael Bayne 0a522606c9 Since TestClient is used outside of Narya, it gets to live in with the rest of
the real source code. That's where reusable classes live. Amazing!

Also cleaned up some build.xml bits and nixed the Retroweaver stuff. I thought
we might have still been using that, but then I saw the hardcoded path to
/usr/local/jdk1.4 and knew that it couldn't be so.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6285 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-18 05:34:49 +00:00
Charlie Groves 6cb678a2fc Need the files in the group tree for XCode to find them. Odd.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6284 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-17 08:16:46 +00:00
Charlie Groves 660acee864 Uhh, yeah, that needed the build and client changes as well
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-17 03:06:39 +00:00
Charlie Groves 973ec8faf8 Generate EntryEvent to get things building again. Add EntryUpdatedEvent for completeness.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6282 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-17 02:55:10 +00:00
Michael Bayne e7ffb611cb This changes things to match Ray's Java event hierarchy change. I don't know
whether it's desirable, or breaks things, or what.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6281 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-17 01:09:21 +00:00
Ray Greenwell a9416fd235 Created a new abstract parent class for Entry*Event: EntryEvent.
The big win is that getKey() now exists on each of those event types.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6278 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-17 00:00:49 +00:00
Charlie Groves 890cc0bdc1 Forgot to commit the RegistrationService implementation on Saturday
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6275 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-16 22:53:45 +00:00
Mike Thomas 9153960fce This was excitingly ASCII-centric. If a filter was specified on "foo*" it would match "foobar" but not "foobär" or "foob0r" - now it should match all of those.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6272 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-16 18:12:03 +00:00
Charlie Groves 08c1051809 Java 1.5, bane of my existence
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6271 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-16 04:06:06 +00:00
Charlie Groves 544d41d24d Make ConnectionManager a general-purpose select server and implement a flash Policy server with it.
The presents-specific portions of ConnectionManager like reading Message subclasses and sending
datagrams are now in PresentsConnectionManager.  PresentsServer should behave identically, except
during shutdown.  Before, connections would be accepted and datagrams would be read until the OMgr
thread exited.  Now, both stop as soon as the server begins its shutdown.  This seems like an
improvement to me, but let me know if it causes issues and I can rework it.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6270 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-16 03:33:45 +00:00
Charlie Groves ecb5f96567 Sort the includes for cross-JVM generation consistency
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6269 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-15 20:52:23 +00:00
Charlie Groves 1cb16d4173 Add RegistrationService to allow cpp clients to register receivers even though they're not using DObject
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6268 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-14 01:01:23 +00:00
Charlie Groves 965f2893b8 Use the proper iOS detection define
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6267 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-14 00:30:43 +00:00
Charlie Groves 4e8fdf66f4 Whoops, 1.6ism
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6265 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-13 22:36:55 +00:00
Charlie Groves 1f010f0a4e Add a C++ client for presents.
It provides code generators for streamables, services and receivers, but not DObject.  It uses
Apple's CFNetwork for its sockets and builds with XCode, so it's limited to OS X and iOS. It should
be straightforward to replace both to make it cross-platform.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-13 21:58:45 +00:00
Michael Bayne 7df0de5389 Keep our resources in src/main/resources per the standard project layout.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:31:33 +00:00
Charlie Groves 07706ec61e handleAcceptedSocket can't be called by code outside of ConnectionManager as it
touches the _handlers Map which should only be modified on the
ConnectionManager thread.  Add transferAcceptedSocket for outside socket
acceptors to call.  It sticks new sockets into a queue, which are then passed
to handleAcceptedSocket as part of ConnectionManager's iterate.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6250 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-05 23:07:19 +00:00
Andrzej Kapolka 07b6a3a102 We should probably reset the dropped count each time the connection is
cleared.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6249 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-05 03:08:12 +00:00