On Thu, 16 Jan 2014 18:18:54 +0900 Cedric BAIL <[email protected]> said:
> Cedric Bail > On Jan 16, 2014 5:32 PM, "Counihan, Tom" <[email protected]> wrote: > > > > Hi Folks, > > > > I'm looking into EET and trying to figure out if, when I create an eet > file can I set some control limitations on the ensuring file size? > > How would I go about placing a size limitation on an eet file? Is it > possible via eet? > > Guidance most graciously appreciated. > > Not at this stage, but I think it could be added quite easily as both > operation that write file do return an error code. It would just require a > first pass to check the total expected size of the file and fail if it will > be to big,before touching anything on disk. Look into eet_lib.c for where > to add the needed code. There is only one place where we do write stuff on > disk, that's where you want to start. eet_write_cipher() to be exact for data, but metadata like aliases also use eet_alias(). it depends how you want to handle size limiting. do you want to limit the full file size or size of payload total (approximate size plus metadata). reality is that file size as a complete size isn't known until eet_close() which will generate all the metadata and then write everything to disk in one go. everything is accumulated in ram until that point. eet_internal_close() handles the nuts and bolts there. if you want to hard-limit a file size as a total then that's where to do it. a simple add of a call like: void eet_size_limit(Eet_File *ef, size_t max_size); would do the trick - store the size (let's sat 0 == no limit) and then enforce that inside eet_flush2() which eet_internal_close() calls to do the actual write. so you can find out you are too big once you close - but only then. finding out toua re too big while writing keys is hard if you want to also know the exact size including metadata. can i ask what the purpose/intent is here of limiting file sizes voluntarily at the eet level? so the devil is in the details. > Regards, > Cedric > > > Warm Regards > > Tom. > > > > > > INTEL > > Automotive Solutions Division (ASD) > > > > Intel Shannon, > > Dromore House, > > East Park, > > Shannon, > > Co. Clare, > > Ireland > > > > Tel : +353 61 477718 > > > > -------------------------------------------------------------- > > Intel Shannon Limited > > Registered in Ireland > > Registered Office: Collinstown Industrial Park, Leixlip, County Kildare > > Registered Number: 308263 > > Business address: Dromore House, East Park, Shannon, Co. Clare > > > > This e-mail and any attachments may contain confidential material for the > sole use of the intended recipient(s). Any review or distribution by others > is strictly prohibited. If you are not the intended recipient, please > contact the sender and delete all copies. > > > > > ------------------------------------------------------------------------------ > > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > > Learn Why More Businesses Are Choosing CenturyLink Cloud For > > Critical Workloads, Development Environments & Everything In Between. > > Get a Quote or Start a Free Trial Today. > > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > _______________________________________________ > > enlightenment-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
