Geeks With Blogs
Blog Moved to http://podwysocki.codebetter.com/ Blog Moved to http://podwysocki.codebetter.com/
Update:  Put a comment in if you want the C# version of this code and I will get it to you
 
In the previous lesson, I left off with the basic understanding of the IBackgroundCopyManager.  Today, we're going to dive a little deeper into what exactly the IBackgroundCopyManager creates, the IBackgroundCopyJob
 
There are many methods in the IBackgroundCopyJob and so much so that it's really difficult to talk about each one in detail.  As the versions of BITS evolved, more interfaces were added to support additional functionality.  Since we are developing this wrapper for BITS 2.0, we need to also include IBackgroundCopyJob2 and IBackgroundCopyJob3.  We are not concerned about IBackgroundCopyJob4 and IBackgroundCopyJob5 as they require Vista.  With those other two, many of the methods are TBD anyhow, so they won't help us.
 
Since there are many things to cover with regards the IBackgroundCopyJob, instead of going over the full method signature, I'll just group them into properties and methods.
 
Methods for IBackgroundCopyJob, 2 and 3:
 
Method Name Description
AddFileSet Add multiple files to a download job.
AddFile Add a single file to a job.
AddFileWithRanges (IBackgroundCopyJob3) Adds a file to the download job with a set of ranges to download from the file.
Cancel Cancels the current job.
Complete Completes the job that has been transferred.
RemoveCredentails (IBackgroundCopyJob2) Removes the credentials from the current job.
ReplaceRemotePrefix (IBackgroundCopyJob3) Replaces the prefix of all remote files such as server name.
SetCredentials (IBackgroundCopyJob2) Sets the credentials for the current job. This can be NTLM, Negotiate, Basic, etc.
Suspend Suspends the current job.
TakeOwnership Takes ownership of the current job. This requires administrator rights.
 
Properties for IBackgroundCopyJob, 2 and 3:
 
Method Name Description
GetDescription
SetDescription
Gets or sets the job description.
GetDisplayName
SetDisplayName
Gets or sets the job display name.
EnumFiles Gets an enumerator to iterate through the IBackgroundCopyFiles.
GetError Gets the current error for the job.
GetErrorCount Gets the number of errors for the job.
GetFileACLTags
SetFileACLTags (IBackgroundCopyJob3)
Gets or sets the owner and ACL tags for SMB download jobs.
GetId Gets the ID for the job.
GetMinimumRetryDelay
SetMinimumRetryDelay
Gets or sets the minimum retry delay.
GetNoProgressTimeout
SetNoProgressTimeout
Gets or set the no progress timeout for the job.
GetNotifyCmdLine
SetNotifyCmdLine (IBackgroundCopyJob2)
Gets or sets the command line to execute once the job enters error or transferred state.
GetNotifyFlags Gets the notification flags.
GetNotifyInterface Gets the notify interface for the job.
GetNotifyInterface Gets the notify interface for the job.
GetPriority
SetPriority
Gets or sets the priority of the job.
GetProgress Gets the progress structure for the job.
GetProxySettings
SetProxySettings
Gets or sets the proxy settings for the job.
GetReplyData(IBackgroundCopyJob2) Gets the data from the upload reply job.
GetReplyFileName
SetReplyFileName (IBackgroundCopyJob2)
Gets or sets the file name that contains the reply data.
GetReplyProgress(IBackgroundCopyJob2) Gets the progress for the current upload reply job.
GetTimes Gets the time structure for the job.
GetType Gets the IBackgroundCopyJob type.
 
So, as you can see from even the IBackgroundCopyJob and the other versions, there are a lot of methods that we need to cover in our design. In the next lesson, we will cover the start of how to turn this into a .NET managed wrapper.
Posted on Wednesday, May 10, 2006 7:34 AM Microsoft , Background Intelligent Transfer Service , .NET , Windows | Back to top


Comments on this post: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Hi,

I would appreciate a copy of the C# code for this project.

Thanks
Roderick
Left by Roderick on Feb 25, 2008 9:15 AM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Hi,

I would like a copy of the C# code please.

Thanks in advance,
Shady
Left by shady azzam on Apr 22, 2008 6:35 PM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Nice work. I'd also like a copy of the C# code.

Thanks,
Chris
Left by Chris on Jun 24, 2008 8:47 AM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Hi,

I would be interested in a copy of the source if convenient.

Thanks,
Lukas
Left by Lukas on Dec 15, 2008 11:27 PM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Hi,


I would be interested in a copy of the C# code if possible. Thanks in advance.


Steffen
Left by Steffen on Apr 20, 2009 7:31 AM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Good description and very help full, here I have to develope all the methods using WCF services can you please help me to write, as I never used BITS APIs and WCF concepts..

I am expecting positive help from you guys.

Thanks
Madhu
Left by madhu on Sep 05, 2009 10:10 AM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Thanks for this nice description. Can you send me the c# code? Thanks in advance.

Daniel
Left by dab on Mar 04, 2010 3:47 PM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Can you provide me the c# code.
Left by Naresh on Aug 26, 2010 12:14 AM

# re: Day 3 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Please send me the C# code
Left by yutz on Oct 13, 2010 2:32 PM

Your comment:
 (will show your gravatar)


Copyright © Matthew Podwysocki | Powered by: GeeksWithBlogs.net