GME  13
Client.h
Go to the documentation of this file.
00001 
00023 #pragma once
00024 
00025 #include "Revision.h"
00026 #include "Targets.h"
00027 #include "svn_client.h"
00028 #include "Prompter.h"
00029 #include "ClientUtil.h"
00030 #include "Pool.h"
00031 
00032 // class mimicing subversion/bindings/java/javahl/native/svnclient.cpp
00033 class CommitMessage;
00034 
00035 class Client
00036 {
00037 public:
00038         //Client(void);
00039         Client( const std::string& p_userName, const std::string& p_passWord);
00040         virtual ~Client(void);
00041 
00042 protected:
00043         // not so public: signaled by the sub_ prefix
00044         long sub_checkout(const char *moduleName, const char *destPath, 
00045                 Revision &revision, Revision &pegRevision, 
00046                 bool recurse, bool ignoreExternals);
00047 
00048         typedef std::vector< long> UPDATE_RES;
00049 
00050         bool sub_update(Targets &targets, Revision &revision, bool recurse,
00051                 bool ignoreExternals, UPDATE_RES& res);
00052 
00053         long sub_commit(Targets &targets, const char *message, bool recurse,
00054                 bool noUnlock);
00055         long sub_commit3(Targets &targets, const char *message, bool recurse,
00056                 bool noUnlock);
00057 
00058         bool sub_cleanup( const char *path);
00059         bool sub_resolved(const char *path, bool recurse);
00060 
00061         bool sub_propertySet(const char *path, const char *name, 
00062                 const char *value, bool recurse, bool force);
00063 
00064         bool sub_lock(Targets &targets, const char *comment, 
00065                 bool force);
00066 
00067         bool sub_unlock(Targets &targets);
00068 
00069         bool sub_info2( const char * p_path, Revision &revision, Revision &pegRevision, bool p_recurse, ClientUtil::InfoHelp::InfoVec& p_infoVect, bool p_suppressIllegalUrlErrorMsg);
00070         bool info2Qck ( const char * p_path, bool p_recursive, ClientUtil::InfoHelp::InfoVec& p_infoVect, bool p_suppressErrorMsg = false);
00071 
00072         int sub_add( const char *p_pathOrUrl, bool rec);
00073         
00074 
00075         long sub_mkdir( Targets& targets, const char * p_msg);
00076         long sub_mkdir2( Targets& targets, const char * p_msg);
00077 
00078         std::auto_ptr<Pool> m_ctxPool;
00079         svn_client_ctx_t* m_ctx;
00080         std::string m_commitMessage;
00081         svn_client_ctx_t * createContext(const char *p_message, apr_pool_t *pool);
00082         svn_client_ctx_t * getContext(const char *p_message, apr_pool_t *pool);
00083 
00084         //void * getCommitMessageBaton(const char *message);
00085 
00086 
00087         ClientUtil::NotifyHelp *m_notify2;
00088         void notification2( ClientUtil::NotifyHelp *notify2);
00089 
00090     Prompter *m_prompter;
00091         void setPrompt(Prompter *prompter);
00092 
00093         ClientUtil::CommitHelp::MsgBuilder * m_commitMessageBuilder;
00094         void setCommitMessageHandler( ClientUtil::CommitHelp::MsgBuilder * p_commitMessageBuilder);
00095 
00096         std::string m_userName;
00097         std::string m_passWord;
00098         std::string m_configDir;
00099 
00100         void cancelOperation();
00101 
00102 
00103         ClientUtil::StatusInfo sub_single_status(const char *path, bool onServer);
00104         ClientUtil::StatusExtInfoVec sub_extended_status( const char * p_path, bool p_onServer);
00105 
00106 public:
00107         bool m_cancelOperation; // client can signal her patience is not endless
00108                                 // accessed from batons as well
00109 };
00110