Authors
- Generated by builder
-
- Declared in:
- XMPPObjectStore.h
- Conforms to:
- ETSerialObjectStore
The XMPPObjectStore allows CoreObjects to be serialized
via an XMPP connection.
Instance Variables
Method summary
- (void)
beginObjectWithUUID: (ETUUID*)objUUID
andApplication: (
NSString*)registeredName;
Starts sending out the object on the stream,
indicating its UUID and the name the handling
application has registered with the DO
nameservice. NOTE: After calling this method,
the XMPPConversation cannot be used to send other data
until the requesting process has finished
serializing.
- (
NSString*)
branch;
Returns the branch currently being written, or the
last branch to be written if the version is finalised.
- (void)
commit;
Guarantees that sending the data is finished by
closing the "coreobject"- and "message"-tags of the
store.
- (void)
createBranch: (
NSString*)newBranch
from: (
NSString*)oldBranch;
Create a new branch from the specified parent
branch.
- (
NSData*)
dataForVersion: (unsigned)aVersion
inBranch: (
NSString*)aBranch;
Interface for an object store that allows serial
data to be written to it.
- (id)
initWithXMLParser: (ETXMLParser*)aParser
XMLWriter: (ETXMLWriter*)aWriter
parent: (id
)aParent key: (id)aKey inConversation: (XMPPConversation*)aConversation;
Designated initializer to set up a fully fledge
store.
- (id)
initWithXMLWriter: (ETXMLWriter*)aWriter
inConversation: (
XMPPConversation*)aConversation;
Initializer to be used if the store is used
only for writing.
- (BOOL)
isValidBranch: (
NSString*)aBranch;
Returns true if the specified branch exists.
- (
NSString*)
parentOfBranch: (
NSString*)aBranch;
Returns the branch that is the parent of the
specified branch.
- (unsigned)
size;
Returns the amount of data written so far in this
version. NOTE: Will always return 0.
- (void)
startVersion: (unsigned)aVersion
inBranch: (
NSString*)aBranch;
Start a new version in the specified branch.
Subsequent data will be written to this branch.
- (unsigned)
version;
Returns the version currently being written, or the
last version to be written if the version is
finalised.
- (void)
writeBytes: (unsigned char*)bytes
count: (unsigned)count;
Writes the specified data to the store.
- (ETXMLParser*)
xmlParser;
Returns the XML parser attached to the store.
- (BOOL)
xmlParserWillRead;
Returns whether the store's XML parser can be used
to deserialize off the stream.
- (ETXMLWriter*)
xmlWriter;
Returns the XML writer attached to the store.
- (BOOL)
xmlWriterWillStore;
Returns whether the XML writer will store the XML
itself so that the
-writeBytes:count:
method of the store does not need to be called.
Instance Variables for XMPPObjectStore Class
@protected NSString* backendName;
The name of the serialization backend used, if it can
be derived.
@protected NSString* branch;
The branch being serialized/deserialized.
@protected NSMutableData* buffer;
A buffer for data that might arrive in a non-XML format.
@protected id conversation;
The conversation the store is attached to. This needs
to be tracked in order to finish the message that forms
the root of the XML tree produced by the serializer.
@protected id deserializer;
The deserializer handling the store.
@protected id proxy;
The remote process that is responsible for handling
deserializations.
@protected ETUUID* uuid;
The UUID of the object in the store.
@protected NSUInteger version;
The version being serialized/deserialized
@protected ETXMLWriter* writer;
The XML writer attached to the store.