Adlib

- Main Page
- Modules
- Data Structures

Typedefs | Enumerations | Functions
AdView_BannerAd

## Typedefs
typedef enum _banner_adposition | banner_adposition_e
| Enumeration for the position to set in banner ads. More...
typedef enum _banner_ad_size | banner_ad_size_e
| Enumeration for the size to set in banner ads. More...

## Enumerations
enum | _banner_adposition { BANNER_AD_POSITION_TOP_LEFT = 0, BANNER_AD_POSITION_TOP_CENTER, BANNER_AD_POSITION_TOP_RIGHT, BANNER_AD_POSITION_CENTER, BANNER_AD_POSITION_BOTTOM_LEFT, BANNER_AD_POSITION_BOTTOM_CENTER, BANNER_AD_POSITION_BOTTOM_RIGHT }
| Enumeration for the position to set in banner ads. More...
enum | _banner_ad_size { BANNER_AD_SIZE_SMALL = 15, BANNER_AD_SIZE_BIG = 10 }
| Enumeration for the size to set in banner ads. More...

## Functions
EXPORT_API adlib_err | adview_add_banner_ad (Evas_Object **banner_ad_obj, Evas_Object *eo, banner_ad_size_e size)
| This api will add the banner ad on the parent received. More...
EXPORT_API adlib_err | adview_banner_load (Evas_Object *banner_ad_obj)
| Loads and shows the ad. Returns the success or failure result to the listener callbacks. More...
EXPORT_API adlib_err | adview_banner_set_enable_auto_refresh (Evas_Object *banner_ad_obj, Eina_Bool enable)
| This api will set the auto refresh feature to either enabled or disabled. If set to disabled ads will not refresh automatically and the app needs to call adview_banner_load for loading a new ad. More...
EXPORT_API adlib_err | adview_banner_set_refresh_interval (Evas_Object *banner_ad_obj, double duration)
| This api will set the auto refresh interval for the ad. Minimum refresh interval should be greater than 10 secs. More...
EXPORT_API adlib_err | adview_banner_ad_set_position (Evas_Object *banner_ad_obj, banner_adposition_e pos)
| Sets the position of the ad. Application can set the position of the ad to the predefined positions defined in adlib_adposition_e. More...
EXPORT_API adlib_err | adview_banner_ad_register_callbacks (Evas_Object *banner_ad_obj, banner_ad_event_callback_s *callback, void *user_data)
| Adds the banner ad callback handler. More...

## Detailed Description

## Typedef Documentation

typedef enum _banner_ad_size banner_ad_size_e

Enumeration for the size to set in banner ads.

Since
  tizen 2.4

typedef enum _banner_adposition banner_adposition_e

Enumeration for the position to set in banner ads.

Since
  tizen 2.4

## Enumeration Type Documentation

enum _banner_ad_size

Enumeration for the size to set in banner ads.

Since
  tizen 2.4

Enumerator
BANNER_AD_SIZE_SMALL | Small
BANNER_AD_SIZE_BIG | Big

enum _banner_adposition

Enumeration for the position to set in banner ads.

Since
  tizen 2.4

Enumerator
BANNER_AD_POSITION_TOP_LEFT | Top left
BANNER_AD_POSITION_TOP_CENTER | Top center
BANNER_AD_POSITION_TOP_RIGHT | Top right
BANNER_AD_POSITION_CENTER | Center
BANNER_AD_POSITION_BOTTOM_LEFT | Bottom left
BANNER_AD_POSITION_BOTTOM_CENTER | Bottom center
BANNER_AD_POSITION_BOTTOM_RIGHT | Bottom right

## Function Documentation

EXPORT_API adlib_err adview_add_banner_ad | ( | Evas_Object ** | banner_ad_obj,
|  | Evas_Object * | eo,
|  | banner_ad_size_e | size
| ) |  |

This api will add the banner ad on the parent received.

Since
  tizen 2.4

Parameters

  [out] | banner_ad_obj | Object created
  [in] | eo | parent object.
  [in] | size | size of the ad to be shown.

Returns
  adlib_err : Returns ADLIB_AD_NO_ERROR on success or with the error occurred.

Return values

  ADLIB_AD_NO_ERROR | Success.
  ADLIB_AD_INVALID_PARAMETERS | Invalid parameter.
  ADLIB_AD_ADLIB_NOT_INITIALIZED | If adlib is not initialised. i.e adlib_init() not called.

Note
  This will only create the object and will not show ad.

EXPORT_API adlib_err adview_banner_ad_register_callbacks | ( | Evas_Object * | banner_ad_obj,
|  | banner_ad_event_callback_s * | callback,
|  | void * | user_data
| ) |  |

Adds the banner ad callback handler.

Since
  tizen 2.4

Parameters

  [in] | banner_ad_obj | Object to be used for this ad instance.
  [in] | callback | The set of callback functions to handle ad lifecycle events
  [in] | user_data | Data to be passed back to the callback

Return values

  ADLIB_AD_NO_ERROR | Success.
  ADLIB_AD_INVALID_AD_HANDLE | Invalid Handle passed.
  ADLIB_AD_INVALID_PARAMETERS | Invalid parameter.

Returns
  adlib_err : Returns ADLIB_AD_NO_ERROR on success or with the error occurred.

EXPORT_API adlib_err adview_banner_ad_set_position | ( | Evas_Object * | banner_ad_obj,
|  | banner_adposition_e | pos
| ) |  |

Sets the position of the ad. Application can set the position of the ad to the predefined positions defined in adlib_adposition_e.

Since
  tizen 2.4

Parameters

  [in] | banner_ad_obj | Object to be used for this ad instance.
  [in] | pos | position of the ad

Return values

  ADLIB_AD_NO_ERROR | Success.
  ADLIB_AD_INVALID_AD_HANDLE | Invalid Handle passed.
  ADLIB_AD_INTERNAL_ERROR | Internal error.

Returns
  adlib_err : Returns ADLIB_AD_NO_ERROR on success or with the error occurred.

EXPORT_API adlib_err adview_banner_load | ( | Evas_Object * | banner_ad_obj | ) |

Loads and shows the ad. Returns the success or failure result to the listener callbacks.

Since
  tizen 2.4

Parameters

  [in] | banner_ad_obj | Object to be used for this ad instance.

See also
  OnLoadFailed and OnLoadSucceeded callbacks.

Returns
  adlib_err : Returns ADLIB_AD_NO_ERROR on success or with the error occurred.

Return values

  ADLIB_AD_NO_ERROR | Success.
  ADLIB_AD_INVALID_AD_HANDLE | Invalid Handle passed.

Postcondition
  This function invokes on_banner_request_succeeded_event_cb() on load success or on_banner_request_failed_event_cb() on load failure.

EXPORT_API adlib_err adview_banner_set_enable_auto_refresh | ( | Evas_Object * | banner_ad_obj,
|  | Eina_Bool | enable
| ) |  |

This api will set the auto refresh feature to either enabled or disabled. If set to disabled ads will not refresh automatically and the app needs to call adview_banner_load for loading a new ad.

Since
  tizen 2.4

Parameters

  [in] | banner_ad_obj | Object to be used for this ad instance.
  [in] | enable | Boolean to enable or disable auto refresh feature.

Return values

  ADLIB_AD_NO_ERROR | Success.
  ADLIB_AD_INVALID_AD_HANDLE | Invalid Handle passed.

Returns
  adlib_err : Returns ADLIB_AD_NO_ERROR on success or with the error occurred.

EXPORT_API adlib_err adview_banner_set_refresh_interval | ( | Evas_Object * | banner_ad_obj,
|  | double | duration
| ) |  |

This api will set the auto refresh interval for the ad. Minimum refresh interval should be greater than 10 secs.

Since
  tizen 2.4

Parameters

  [in] | banner_ad_obj | Object to be used for this ad instance.
  [in] | duration | Refresh interval value should be >= 10.

Return values

  ADLIB_AD_NO_ERROR | Success.
  ADLIB_AD_INVALID_AD_HANDLE | Invalid Handle passed.
  ADLIB_AD_INVALID_PARAMETERS | Invalid parameter.

Returns
  adlib_err : Returns ADLIB_AD_NO_ERROR on success or with the error occurred.