Re: DiskDevice API 2.2 remarks

Tyler Dauwalder <tyler-cyCl/[email protected]>
Newsgroups gmane.os.openbeos.storage
Message-ID <[email protected]>
On 2003-04-08 at 14:18:24 [-0700], Ingo Weinhold wrote:
[Job Progress Notification]
> > > Ah, OK. Doesn't harm at least. BTW, the idea is to send 
> > > encountered
> > > errors via notifications? I hope that doesn't have impact on
> > > performance.
> > 
> > Yes, but only to the provided progressMessenger, not through the
> > watching system.
> 
> So, other notification subscribers could not get these data? 

No, I guess I wasn't planning on that. But I guess there's really no 
reason to not include it along with the rest of the notification 
stuff, so nevermind.

> IIRC, I
> already proposed to add a B_DEVICE_JOB_PROGRESS notification "event"
> field value and a respective event mask flag (can't find the mail --
> maybe I was just dreaming).

I think you're thinking of your suggestion of BDiskDeviceJob::Status() 
and it's various codes, but maybe not. Either way, yes that's worth 
adding.

> A B_DEVICE_JOB_DETAILED_PROGRESS plus 
> event
> mask flag could be added, too. 

Okay, that seems reasonable. And we can always get rid of it if it 
ends up being overkill.

> Moreover I start to feel, that a
> BDiskDeviceRoster::StartWatching(BDiskDeviceJob*,...) version might
> make sense. What do you think?

That's probably how we'd want to instigate watching for the 
progressMessenger supplied to the job initiation functions anyway, so 
why not? :-) How about StartWatchingJob() instead, though (since it's 
more specific in function)? 

So how about these masks (different names, are they okay?):

B_DEVICE_REQUEST_JOB_SIMPLE_PROGRESS	= 0x0040, 	
   // simple job progress (i.e. "% complete" only)
B_DEVICE_REQUEST_JOB_EXTRA_PROGRESS		= 0x0080, 	
   // extra info on job progress (no "% complete" info)
B_DEVICE_REQUEST_JOB_COMPLETE_PROGRESS	= 0x00C0, 	
   // complete job progress info

I have the first two mutually exclusive because I figured we'd need to 
have that split somewhere in the implementation anyway. And then:

status_t BDiskDeviceRoster::StartWatchingJob(BDiskDeviceJob *job, 
BMessenger target, uint32 eventMask = 
B_DEVICE_REQUEST_JOB_COMPLETE_PROGRESS);

-Tyler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.