/****************************************************************************** * TMClientUser.cpp - description * ------------------- * begin : 2005/04/20 * copyright : (C) 2005 by Harald K. Strack * copyright : (C) 2005 by Trymedia Inc. * email : hstrack@trymedia.com, strack@fhm.edu ****************************************************************************** * changes name date comment * hks 2005/05/24 Constructor improved for more flexiblility. */ /* TMClientUser: Trymedia Client User. * * This user hooks all FileSys calls (see TMFSHook.cpp). * * It also hooks the OutputStat() method to get attributes from the server * (see TMBOSync.cpp). * * Derivied classes have to assign a handler to itself. This class takes * every handler. * */ #include "TMClientUser.h" //Do not use this TMClientUser::TMClientUser() : ClientUser() {} //Use this TMClientUser::TMClientUser(ClientApi * ca, TMBOType tt = STANDARD) : ClientUser () { this->ca = ca; this->tmbo = NULL; SetTMBO (tt); } TMClientUser::~TMClientUser() { } /* Assigns a handler to the user */ void TMClientUser::SetTMBO ( TMBOType tt = STANDARD ) { this->tmbo = TMBO::Create ( this->ca , tt); } /* Assigns a new FileSys * to the user */ FileSys *TMClientUser::File( FileSysType type ) { TMFSHook * tmfsh = TMFSHook::Create(type); tmfsh->SetTMBO( this->tmbo ); return tmfsh; } // // OutputStat is only called when we run our "p4 fstat"(internally), not when we run // the command itself (from command line). // void TMClientUser::OutputStat( StrDict *varList ) { StrPtr *path = varList->GetVar( "clientFile" ); if (this->tmbo == NULL ) { cerr << "TRYMEDIA ClientUser: No Handler (BO) set. Giving up." << endl; exit (1); } if (this->tmbo->GetType() == SYNC_HANDLER || this->tmbo->GetType() == REVERT_HANDLER) { //Set the path tmbo->SetPath(tmbo->GetTmpNode(), path); //Set the permissions tmbo->SetPerm(tmbo->GetTmpNode(), varList->GetVar( TM_PERMISSION_ATTR_GET )); //Set uid tmbo->SetUid(tmbo->GetTmpNode(), varList->GetVar( TM_USER_ATTR_GET )); //Set gid tmbo->SetGid(tmbo->GetTmpNode(), varList->GetVar( TM_GROUP_ATTR_GET )); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#6 | 5069 | harald_strack |
ADDITIONAL command parameter handling introduced. ap4 sync -n is handled. Usually there is no need for handling any command specific parameters. Tests improved. |
||
#5 | 5056 | harald_strack |
Directory support. Serious bug concerned to not unzipped binaries removed. Some other small bugfixes. |
||
#4 | 4980 | harald_strack |
Since I am maintaining the stuff in a local repository, I did some copy errors in the last revisions. Fixed. |
||
#3 | 4978 | harald_strack |
ap4 integrate implemented. Octal format is now used to save permissions. NOT backwards compatible anymore!!! |
||
#2 | 4975 | harald_strack |
Permissions are now masked to 555, so no write is possible. If you edit the Makefile and give the parameter -DFULL_PERMS, you have the old behaviour. Bugfix in ap4 revert: Edited and changed files were not reverted correctly. |
||
#1 | 4948 | harald_strack | Initial revision. |