Geeks With Blogs
Blog Moved to Blog Moved to
UPDATE: See Day 9 of the Background Intelligent Transfer Service (BITS) Managed Wrapper for the source code plus binaries.
In previous lessons, I laid out the basic API for BITS.  Now I think it's time for us to start doing the actual planning on how to wrap this API.  Let's start by mapping out the BITS types and then creating our own wrapped types.  Below, I have a table of those native types and what the wrapped types will be:
Unmanaged BITS Type Wrapped Type
BG_AUTH_SCHEME AuthenticationScheme
BG_AUTH_TARGET AuthenticationTarget
BG_ERROR_CONTEXT BackgroundErrorContext
BG_JOB_PRIORITY BackgroundCopyJobPriority
BG_JOB_PROXY_USAGE BackgroundCopyJobProxyUsage
BG_JOB_STATE BackgroundCopyJobState
BG_JOB_TYPE BackgroundCopyJobType
Flags from IBackgroundCopyJob3::SetFileACLFlags BackgroundCopyJobFileACLTags
Flags from IBackgroundCopyJob::SetNotifyFlags BackgroundCopyJobNotifyFlags
Unmanaged BITS Type Wrapped Type
BG_FILE_INFO BackgroundCopyFileInfo
BG_FILE_PROGRESS BackgroundCopyFileProgress
BG_FILE_RANGE BackgroundCopyFileRange
BG_JOB_PROGRESS BackgroundCopyJobProgress
BG_JOB_REPLY_PROGRESS BackgroundCopyJobReplyProgress
Unmanaged BITS Type Wrapped Type
IBackgroundCopyCallback BackgroundCopyJobEventManager
IBackgroundCopyError BackgroundCopyError
IBackgroundCopyFileIBackgroundCopyFile2 BackgroundCopyFile
IBackgroundCopyJobIBackgroundCopyJob2IBackgroundCopyJob3 BackgroundCopyJob
IBackgroundCopyManager BackgroundCopyManager
IEnumBackgroundCopyFiles BackgroundCopyFileCollection
IEnumBackgroundCopyJobs BackgroundCopyJobCollection
So, in short, we have a lot of work ahead of us laying out these files.  I won't cover every excruciating detail unless need be, but I want to show how you translate between unmanaged and managed types.  That will be the next lesson.
Posted on Wednesday, May 10, 2006 7:37 AM Microsoft , Background Intelligent Transfer Service , .NET , Windows | Back to top

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

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Matthew Podwysocki | Powered by: