Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosstorage] || [Date Prev] [04-2003 Date Index] [Date Next] || [Thread Prev] [04-2003 Thread Index] [Thread Next]

[openbeosstorage] Re: DiskDevice API 2.2 remarks

  • From: Tyler Dauwalder <tyler@xxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Wed, 09 Apr 2003 00:08:35 -0700
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





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.