Public Member Functions | Private Member Functions | Private Attributes | Friends

ABI_Collab_Import Class Reference

#include <AbiCollab_Import.h>

List of all members.

Public Member Functions

 ABI_Collab_Import (AbiCollab *pAbiCollab, PD_Document *doc)
 ~ABI_Collab_Import ()
bool import (const SessionPacket &sPacket, BuddyPtr collaborator)
std::map< BuddyPtr, UT_sint32 > & getRemoteRevisions ()
PT_DocPosition getEndOfDoc ()
void masterInit ()
void slaveInit (BuddyPtr pBuddy, UT_sint32 iRev)

Private Member Functions

bool _isOverlapping (UT_sint32 pos1, UT_sint32 length1, UT_sint32 pos2, UT_sint32 length2)
void _calculateCollisionSeqence (UT_sint32 iIncomingRemoteRev, const std::string &sIncomingDocUUID, UT_sint32 &iStart, UT_sint32 &iEnd)
UT_sint32 _getIncomingAdjustmentForState (const UT_GenericVector< ChangeAdjust * > *pExpAdjusts, UT_sint32 iStart, UT_sint32 iEnd, UT_sint32 iIncomingPos, UT_sint32 iIncomingLength, const std::string &sIncomingUUID, std::deque< int > &impAdjs)
bool _checkForCollision (const AbstractChangeRecordSessionPacket &acrsp, UT_sint32 &iRev, UT_sint32 &iImportAdjustment)
bool _handleCollision (UT_sint32 iIncommingRev, UT_sint32 iLocalRev, BuddyPtr pCollaborator)
bool _shouldIgnore (BuddyPtr pCollaborator)
void _disableUpdates (UT_GenericVector< AV_View * > &vecViews, bool bIsGlob)
void _enableUpdates (UT_GenericVector< AV_View * > vecViews, bool bIsGlob)
bool _import (const SessionPacket &packet, UT_sint32 iImportAdjustment, BuddyPtr pCollaborator, bool inGlob=false)

Private Attributes

PD_Documentm_pDoc
AbiCollabm_pAbiCollab
std::map< BuddyPtr, UT_sint32m_remoteRevs
std::vector< std::pair
< BuddyPtr, UT_sint32 > > 
m_revertSet
std::deque< UT_sint32m_iAlreadyRevertedRevs

Friends

class FakeAccountHandler

Constructor & Destructor Documentation

ABI_Collab_Import::ABI_Collab_Import ( AbiCollab pAbiCollab,
PD_Document doc 
)
ABI_Collab_Import::~ABI_Collab_Import (  ) 

Member Function Documentation

void ABI_Collab_Import::_calculateCollisionSeqence ( UT_sint32  iIncomingRemoteRev,
const std::string &  sIncomingDocUUID,
UT_sint32 iStart,
UT_sint32 iEnd 
) [private]
bool ABI_Collab_Import::_checkForCollision ( const AbstractChangeRecordSessionPacket acrsp,
UT_sint32 iRev,
UT_sint32 iImportAdjustment 
) [private]
void ABI_Collab_Import::_disableUpdates ( UT_GenericVector< AV_View * > &  vecViews,
bool  bIsGlob 
) [private]
void ABI_Collab_Import::_enableUpdates ( UT_GenericVector< AV_View * >  vecViews,
bool  bIsGlob 
) [private]
UT_sint32 ABI_Collab_Import::_getIncomingAdjustmentForState ( const UT_GenericVector< ChangeAdjust * > *  pExpAdjusts,
UT_sint32  iStart,
UT_sint32  iEnd,
UT_sint32  iIncomingPos,
UT_sint32  iIncomingLength,
const std::string &  sIncomingUUID,
std::deque< int > &  impAdjs 
) [private]
bool ABI_Collab_Import::_handleCollision ( UT_sint32  iIncommingRev,
UT_sint32  iLocalRev,
BuddyPtr  pCollaborator 
) [private]
bool ABI_Collab_Import::_import ( const SessionPacket packet,
UT_sint32  iImportAdjustment,
BuddyPtr  pCollaborator,
bool  inGlob = false 
) [private]

Take a packet, interpret it's contents and apply the implied operations on the document.

References _PCT_FirstChangeRecord, AV_CHG_FMTBLOCK, AV_CHG_FMTCHAR, AV_CHG_FMTSTYLE, AV_CHG_PAGECOUNT, AV_CHG_TYPING, PD_Document::changeDocPropeties(), PD_Document::changeSpanFmt(), PD_Document::changeStruxFmt(), PD_Document::createAndSendCR(), PD_Document::createDataItem(), PD_Document::deleteFmtMark(), PD_Document::deleteSpan(), PD_Document::deleteStrux(), gchar, XAP_App::getApp(), Props_ChangeRecordSessionPacket::getAttribute(), Props_ChangeRecordSessionPacket::getAtts(), XAP_Frame::getCurrentView(), PD_Document::getDocumentRDF(), getEndOfDoc(), XAP_App::getLastFocussedFrame(), ChangeRecordSessionPacket::getLength(), PD_Style::getName(), Object_ChangeRecordSessionPacket::getObjectType(), GlobSessionPacket::getPackets(), ChangeRecordSessionPacket::getPos(), Props_ChangeRecordSessionPacket::getProps(), ChangeRecordSessionPacket::getPXType(), ChangeRecordSessionPacket::getRev(), RevertSessionPacket::getRev(), GlobSessionPacket::getRev(), SignalSessionPacket::getSignalType(), PD_Document::getStruxOfTypeFromPosition(), PD_Document::getStyleFromSDH(), PD_Document::insertObject(), PD_Document::insertSpan(), PD_Document::insertStrux(), UT_UCS4String::length(), Data_ChangeRecordSessionPacket::m_bTokenSet, DeleteStrux_ChangeRecordSessionPacket::m_eStruxType, ChangeStrux_ChangeRecordSessionPacket::m_eStruxType, m_iAlreadyRevertedRevs, m_pDoc, m_remoteRevs, m_revertSet, InsertSpan_ChangeRecordSessionPacket::m_sText, Data_ChangeRecordSessionPacket::m_sToken, Data_ChangeRecordSessionPacket::m_vecData, FV_View::notifyListeners(), PCT_GlobSessionPacket, PCT_RevertAckSessionPacket, PCT_RevertSessionPacket, PCT_SignalSessionPacket, PP_std_copyProps(), PT_DATAITEM_ATTRIBUTE_NAME, PTC_SetExactly, PTX_Block, PX_ChangeRecord::PXT_ChangeDocProp, PX_ChangeRecord::PXT_ChangeDocRDF, PX_ChangeRecord::PXT_ChangeFmtMark, PX_ChangeRecord::PXT_ChangeObject, PX_ChangeRecord::PXT_ChangePoint, PX_ChangeRecord::PXT_ChangeSpan, PX_ChangeRecord::PXT_ChangeStrux, PX_ChangeRecord::PXT_CreateDataItem, PX_ChangeRecord::PXT_DeleteFmtMark, PX_ChangeRecord::PXT_DeleteObject, PX_ChangeRecord::PXT_DeleteSpan, PX_ChangeRecord::PXT_DeleteStrux, PX_ChangeRecord::PXT_GlobMarker, PX_ChangeRecord::PXT_InsertFmtMark, PX_ChangeRecord::PXT_InsertObject, PX_ChangeRecord::PXT_InsertSpan, PX_ChangeRecord::PXT_InsertStrux, PX_ChangeRecord::PXT_ListUpdate, PX_ChangeRecord::PXT_RemoveList, PX_ChangeRecord::PXT_StopList, PX_ChangeRecord::PXT_UpdateField, PX_ChangeRecord::PXT_UpdateLayout, PP_AttrProp::setAttributes(), PP_AttrProp::setProperties(), PD_Document::signalListeners(), szName, UT_UCS4String::ucs4_str(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_NOT_IMPLEMENTED, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.

Referenced by FakeAccountHandler::_import(), and import().

bool ABI_Collab_Import::_isOverlapping ( UT_sint32  pos1,
UT_sint32  length1,
UT_sint32  pos2,
UT_sint32  length2 
) [private]
bool ABI_Collab_Import::_shouldIgnore ( BuddyPtr  pCollaborator  )  [private]
PT_DocPosition ABI_Collab_Import::getEndOfDoc ( void   ) 

References PD_Document::getBounds(), and m_pDoc.

Referenced by _import().

std::map<BuddyPtr, UT_sint32>& ABI_Collab_Import::getRemoteRevisions (  )  [inline]
bool ABI_Collab_Import::import ( const SessionPacket sPacket,
BuddyPtr  collaborator 
)
void ABI_Collab_Import::masterInit (  ) 
void ABI_Collab_Import::slaveInit ( BuddyPtr  pBuddy,
UT_sint32  iRev 
)

Friends And Related Function Documentation

friend class FakeAccountHandler [friend]

Member Data Documentation

std::vector<std::pair<BuddyPtr, UT_sint32> > ABI_Collab_Import::m_revertSet [private]

The documentation for this class was generated from the following files: