A profile object is created by an Fei object for every file is handles. A pointer to a file's profile record is returned by Fei::results.
When you first look at a file's profile record, you should check the status with the getStatus method. If the value is anything but FEI_OK, there's an error associated with the file or its transmission by FEI. A profile record contains several pieces of information that may be of of interest. Each is accessed by one of FeiProfile's get... methods. See the following for more information:
The method getStatus has already been mentioned. If an error occurs, you can retrieve the text of the error message with the method getMsg.
The method getProfileString returns a formated string with the following syntax:
fileType/fileName [, timeStamp] [, size] [, crc]Use this method as a convient way to supply information about a file to the user.
Profile objects are returned in an Fei queue. These records are not deleted by Fei. It's you responsibility to retrieve them and then to delete them when you're done with them. Note: always use "delete", and not "free" to deallocate memory associated with a profile object. You can retain some of the information in a profile record before deleting it by using FEI_RETAIN as the argument to specified get... methods. For example, to retain the buffer associated with a file's contents returned to memory, you would use the following command:
void *addr = profile->getAddr (FEI_RETAIN);Then, after the profile object is deleted:
delete profile;you can still access the content buffer. (If you're keeping the content buffer around, you should also get the buffer's size with "getSize()'.)
For more information on the class, see the header file: FeiProfile.h
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to retain, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.
[ ]
The size of the file is given in bytes. If the crc value is not defined it's not included in the fromatted string. The values in the string are returned in fixed length fields so they line-up in columns.
Returns the formated string for add, replace, get, subscribe, notify, live list and list commands. Otherwise it returns the NULL string. The space allocated for this string should not be directly deleted by you. It's deleted by FeiProfile code when the profile is deleted.
If the optional argument retain is set to FEI_RETAIN, then the memory allocated for this variable will not be deleted when you delete the profile record. It is then your responsibility to deallocate the memory when you no longer need it. Note: use delete, not free, to deallocate the memory.