Next: Obtaining the Description of
Up: The Advertisement Package
Previous: Adding Advertisables to an
  Contents
Deleting an advertisable from a GATAdvertService is much easier than adding
and advertisable to a GATAdvertService instance. One need only make use of
the following function
GATResult GATAdvertService_Delete(GATAdvertService object, GATString_const path)
The first argument to this function is a GATAdvertService specifying the GATAdvertService
instance from which avertisable are to be deleted. The second argument is a GATString instance
which is the path of the advertisable to be deleted. This function returns a GATResult, covered
in detail in Appendix , which indicates the completion status of this function.
To take this machine out for a test drive lets consider a code snippet which could be used to delete
the GATFile instance added in our previous example. The could snippet would have the following
arc
GATResult result;
GATString string;
GATAdvertService advertService;
advertService = ...
string = GATString_Create( "/tmp/trash", 11, "ASCII" );
result = GATAdvertService_Delete( advertService, string );
if( GAT_SUCCEEDED( result ) )
{
/* The advertisable at the path string has been removed */
}
Andre Merzky
2004-05-13
|