[commits] [Wiki] changed: ActiveSync/Development
Michael Rubinsky
mrubinsk at horde.org
Wed Nov 23 23:30:16 UTC 2016
mrubinsk Wed, 23 Nov 2016 23:30:16 +0000
Modified page: https://wiki.horde.org/ActiveSync/Development
New Revision: 8
Change log: Fill out the rest of the interesting H_AS classes.
@@ -24,8 +24,18 @@
: Horde_ActiveSync_Rfc822 : Deals with handling RFC822 email message
strings/streams in the context of EAS. E.g., used when handling
incoming SENDMAIL commands.
: Horde_ActiveSync_SyncCache : This class is responsible for
storing/loading the SyncCache data from the storage/state driver. The
SyncCache started life as a way of caching data from SYNC and PING
requests that would be needed if the client issued an "empty"
SYNC/PING request. Empty requests are required to use the same values
as the last non-empty request. It has since grown to be essentially a
shared data store that helps keep collection data up to date between
any and all running requests. Most (if not all) interaction with this
class is through the Horde_ActiveSync_Collections object.
+
+: Horde_ActiveSync_Connector : These classes are responsible for
sending/receiving the structured WBXML for certain requests. E.g., the
H_AS_C_Exporter_Sync object contain methods that are called from the
H_AS_Request_Sync object that send the WBXML needed for sending each
change. It is passed the message object, encodes it to WBXML, and
wraps it with any needed response WBXML before sending it down the
output stream. Likewise, the H_AS_C_Importer object reads the
structured WBXML for importing changes. These methods are called from
the Horde_ActiveSync_Request_* classes after the changes have been
fetched.
+
+: Horde_ActiveSync_Driver_Base : This is the base class that
Horde_Core_ActiveSync_Driver extends.
+
+: Horde_ActiveSync_Folder_* : These classes represent a specific
collection's state. It's an abstraction around the state data and
represents the point in time of the sync represented by the synckey.
For non-email collections, this basically stores the last known
syncstamp/time along with a few other details. For email folders, this
class stores things like the HIGHESTMODSEQ, UIDVALIDITY, NEXTUID, and
the list of IMAP UIDS that the are on the client etc... If not using a
server that supports CONDSTORE then this will also contain flag
information. Also contains logic used to set/get/calculate what UIDs
have changed/vanished etc... These objects are used to transport the
change set back and forth from the backend driver to the ActiveSync
code that fetches and sends each detected change.
+
+: Horde_ActiveSync_Imap_* : These classes interact with the IMAP
server. H_AS_I_Adapter contains the bulk of the logic for fetching
changes, messages, etc.... The Message object wraps a single IMAP
message and the MessageBodyData object abstracts access to the
message's body taking various things into account (if the client needs
HTML body, if it needs truncation) and ensuring the data is proper
UTF-8 data.
+
+: Horde_ActiveSync_Message_* : These classes represent either an
actual message item i.e., a Calendar item or a part of a message item
that is contained by a message item i.e., and Attendee or a Flag. Each
class is responsible for knowing how to encode itself into WBXML or to
decode a WBXML stream into the item's properties.
+++ Horde_Core
@@ -36,11 +46,11 @@
: [[# activesyncserver Horde_Core_Factory_ActiveSyncServer]] :
Creates the main //Horde_ActiveSync// object. Injects the
//Horde_Core_ActiveSync_Driver//, the WBXML encoder/decoder objects,
the //Horde_ActiveSync_State_[Sql|Mongo]// storage object and the
//Horde_Controller_Request// object.
: Horde_Core_Factory_ActiveSyncState : Creates the state storage
handler. The name is misleading (and will change in Horde 6) as this
class has evolved to be more of a general storage handler and now
handles more than just device state. We will assume a Sql storage
backend for this document.
-: Horde_Core_Factory_ActiveSyncBackend : Creates the
//Horde_Core_ActiveSync_Driver// backend driver. Injects
//Horde_Core_ActiveSync_Connector//, //Horde_ActiveSync_Imap_Adapter//
(if needed), the state storage driver, and the
//Horde_Core_ActiveSync_Auth// object.
+: Horde_Core_Factory_ActiveSyncBackend : Creates the
//Horde_Core_ActiveSync_Driver// backend driver. Injects
//Horde_Core_ActiveSync_Connector//,
//Horde_Core_ActiveSync_Imap_Factory// (if needed), the state storage
driver, and the //Horde_Core_ActiveSync_Auth// object.
-++++ TODO ....
+: Horde_Core_ActiveSync_Imap_Factory : Responsible for constructing
the Horde_ActiveSync_Imap_Adapter, for returning the folder tree, and
information on available user-defined flags. This factory is injected
into the backend driver.
++ Protocol Overview
It's beyond the scope to explain the ActiveSync protocol in detail.
For that, there is the official
[https://msdn.microsoft.com/en-us/library/cc425499(v=exchg.80).aspx
documentation]. The most useful of these are
More information about the commits
mailing list