TrackGit
Clone.h
Go to the documentation of this file.
1 
8 #ifndef _CLONE_H_
9 #define _CLONE_H_
10 
11 #include "GitCommand.h"
12 
13 #include <SupportKit.h>
14 
15 #include <git2.h>
16 #include <pthread.h>
17 
18 class CloneWindow;
19 
24 typedef struct progress_data {
25  git_transfer_progress fetch_progress;
27  size_t total_steps;
28  const char *path;
31 
32 
36 struct param {
37  const char* url;
38  const char* path;
40 };
41 
42 
46 class Clone : public GitCommand {
50  BString fRepo;
54  BString fDirPath;
59 public:
60  Clone(BString, BString);
62  virtual void Execute();
63  pthread_t DoClone(CloneWindow*, const char*, const char*);
64 };
65 
66 #endif
Clone(BString, BString)
Clone class Constructor.
Definition: Clone.cpp:23
size_t total_steps
Definition: Clone.h:27
const char * path
Definition: Clone.h:38
git_transfer_progress fetch_progress
Definition: Clone.h:25
size_t completed_steps
Definition: Clone.h:26
GitCommand Class.
Definition: GitCommand.h:20
The progress data payload.
Definition: Clone.h:24
struct progress_data progress_data
The progress data payload.
CloneWindow * cloneWindow
Definition: Clone.h:39
const char * url
Definition: Clone.h:37
TrackGitWindow * fCloneWindow
The window to show progress.
Definition: Clone.h:58
TrackGitWindow * GetWindow()
This returns pointer to the clone window.
Definition: Clone.cpp:38
BString fDirPath
The current directory where Clone option is selected.
Definition: Clone.h:54
Parameters to pass to clone thread.
Definition: Clone.h:36
The Clone Window class.
Definition: CloneWindow.h:30
virtual void Execute()
Clone command execution.
Definition: Clone.cpp:50
pthread_t DoClone(CloneWindow *, const char *, const char *)
Spawns a thread to clone.
Definition: Clone.cpp:213
Clone command Class.
Definition: Clone.h:46
The TrackGit Window class.
const char * path
Definition: Clone.h:28
CloneWindow * cloneWindow
Definition: Clone.h:29
Header file of GitCommand.
BString fRepo
The repo/directory where the command is called.
Definition: Clone.h:50