GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Adding Advertisables to an Up: The Advertisement Package Previous: The Advertisement Package   Contents

Constructing and Destroying AdvertService Instances

Before we can proffer up an oblation to this paynim djinni we must create an instance of this deity to which we can tender our offering. This is done through a call to the follows function

GATAdvertService GATAdvertService_Create( GATContext context, 
                                          GATPreferences_const preferences)

The first argument to this function is a GATContext instance, the details of which have been covered previously. The next argument is a GATPreferences_const instance, the details of which are covered in Appendix [*]. This function returns an instance of the class GATAdvertService corresponding to the data passed to it but returns NULL if it encounters any problems in creating such a deity.

An as example of this function in the act of djinni creation, let us consider this little code snippet

GATContext context;
GATAdvertService advertService;

context = ...

advertService = GATAdvertService_Create( context, NULL );

Now after wishing this djinni into existence and making it do any little dance we see fit, we need to put it down. Hey, no one mans the hallucinogen spilling fissures at the Delphi anymore or pays homage to Aeolus, Aether, or Aphrodite; so, why should we keep our djinni around any longer than needed. Well, the that light burns twice as bright burns half as long, and our djinni has burned so very, very brightly. Here is its Shiva

void GATAdvertService_Destroy(GATAdvertService *object)

The first argument to this function is a pointer to the GATAdvertService that one wishes to destroy. Upon return from this function all the resources which were tied up by the passed GATAdvertService instance are freed.


next up previous contents
Next: Adding Advertisables to an Up: The Advertisement Package Previous: The Advertisement Package   Contents
Andre Merzky 2004-05-13