#1 Burning Software

It is currently Sun Apr 28, 2024 7:56 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Serialization Support
PostPosted: Mon Aug 25, 2008 2:20 pm 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
Hello Support,
I am using StarburnX Version 10.0.0.1 (Build 2008-07-14).

The problem is about the Serialization support.
I want to save the current state of object of DataBurner class into an XML file. (The object contains Files, Folders, and New Folders). But DataBurner class itself is not serialized and not able to make it serializable.
Is there any way to save the object or make the class DataBurner serializable so that I can save the information in XML file.
Thank you in advance.


Top
 Profile  
 
 Post subject: Re: Serialization Support
PostPosted: Mon Aug 25, 2008 7:30 pm 
Offline

Joined: Fri Jan 11, 2008 6:13 am
Posts: 200
Location: BVI
Unfortunately what you ask is beoynd the scope of the StarBurn SDK... We don't have such a functionality either declared or implemented (or even planned as you're the first one who had asked since the very beginning, 2001 or so I think...). Sorry..................

deepakp wrote:
Hello Support,
I am using StarburnX Version 10.0.0.1 (Build 2008-07-14).

The problem is about the Serialization support.
I want to save the current state of object of DataBurner class into an XML file. (The object contains Files, Folders, and New Folders). But DataBurner class itself is not serialized and not able to make it serializable.
Is there any way to save the object or make the class DataBurner serializable so that I can save the information in XML file.
Thank you in advance.


Top
 Profile  
 
 Post subject: Re : Serialization Support
PostPosted: Tue Aug 26, 2008 8:02 am 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
Hello Support,
Thank you for your instant reply.
The intention of asked question was to save project(list of files , folders & new folders added for burning compilation) through serialization i.e. serializing our databurner object, which stores this list of files. Is there any alternative way to do the same thing, so that we can support the project saving feature.
Please can you kindly suggest me any solution for the above problem.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2008 2:36 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

Yes, the "alternative" way exists:

Way 1: You can use the Files property (the DataFolder and DataBurner have this property). The returned IDataFiles collection contains all files & folders which are children of current folder. In fact You should implement the recursive search in order to determine all files and folders. This search should be started from DataBurner object!!


Way 2: As You have your own tree control with files and folders You can implement recursive search for this control!!!

Note( for both ways): When You will restoring the saved data into DataBurner object You should use CreateFolder method instead of AddDirectory method and add the children items manually ... one by one!

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re : Serialization Support
PostPosted: Thu Aug 28, 2008 2:24 pm 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
I have gone through your answer. But by this way we are not able to show the actual modified date for the virtual folder that is created by the user.
Also for each virtual folder, we have to create a new folder and then start adding the files up to last level.
So if there is any way to serialize the databurner class, it will be very good.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 02, 2008 8:43 pm 
Offline

Joined: Fri Jan 11, 2008 6:13 am
Posts: 200
Location: BVI
We'll definitely find some way but not very soon as there are much more critical things pending (like native 64-bit support).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 27, 2008 2:14 pm 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
Hello Support,
I want to burn at least 3 GB of data on one disc, which is from various locations from file system so I have added that data to DataBurner object. Burned that data on one disc.
Again I want to add the same previous and more 1 GB of data on another disc with some modifications in the previous added data. But I don't want to add the previously added 3 GB of data again from those various locations.
So is it possible that I can save the previous object somewhere or copy that in a new object of DataBurner.
I tried to copy the object of DataBurner before burning in a new object but I think internally points to the same object. So got the error message that internal filesystem is already built you cannot modify that.
Is there any way do the same. Waiting for reply.
If serialization will be possible this is simple thing to do. It will be great if serialization support will be given fro StarBurnX DataBurner object.
Please kindly reply.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 27, 2008 5:05 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

Unfortunately is not possible to reuse the file system structures from the DataBurner :(. In fact you should implement the file system tree and should manage the add/remove/rename operations. You should implement also the functionality which will recreate(restore) the files system for DataBurner from the your file system tree.

For example:

1) You define two classes FileDescriptor and FolderDescriptor where the FolderDescriptor class can extend the FileDescriptor class by adding some methods ... addxx, removexx etc.
The FileDescriptor class will keep the next data:
- Name
- Path -> if user attach the file/folder from the other place ( if file/folder is not the nested file/folder ) then this property will keep the full path to the source file/folder. Otherwise this property is EMPTY;
- NewName -> will be filled in case when user renames file/folder;
- IsDeleted -> in case when user deletes file/folder you should set TRUE value for this property. The descriptor should not be deleted!!!

The FileDescriptor class will keep additionally collection of nested items


2) How restore folder:

1.- you get the Folder descriptor from the your tree and:
- you check the IsDeleted property
- if IsDeleted is TRUE - we should check if file/folder is already exist in the DataBurner and should remove this if so , otherwise (if file/folder is not in DataBurner) you should don't append the file/folder into DataBurner!!
- if IsDeleted is FALSE then we should:
- check the Path property
- if Path property is not Empty ( the all file/folders objects for the top level will have this property filled!) it means that file/folder was added from the different place and thus we should add this file/folder into DataBurner manually ... ;
- if Path property is Empty - do nothing because file/folder is already in DataBurner!!
- you check the NewName property
- if NewName property is not Empty then you should Get the current file/folder object from the DataBurner and rename his!
- if NewName property is Empty - do nothing;

You should recursively repeat all off these steps for the nested files/folders for the added folder.


Regards,

Dmitry


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 46 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group