Adlib
Data Structures | Typedefs | Enumerations | Functions
AdLib

Data Structures

struct  banner_ad_event_cb
 Banner ad event callbacks. More...
 
struct  interstitial_ad_event_cb
 Interstitial ad event callbacks. More...
 

Typedefs

typedef struct _banner_addata banner_ad_h
 Banner ad handle for handling banner ads. More...
 
typedef enum _adlib_err adlib_err
 Enumeration for the error codes of adlib. More...
 
typedef enum adlib_event_type adlib_event_type_e
 Enumeration for the event types of adlib. More...
 
typedef enum _adlib_state_type adlib_state_type_e
 Enumeration for the state types of adlib. More...
 
typedef enum _adlib_gender adlib_gender_e
 Enumeration for the gender used in adlib. More...
 
typedef void(* on_banner_request_succeeded_event_cb) (Evas_Object *banner_ad_obj, void *user_data)
 Called when the banner ad load is succeeded. More...
 
typedef void(* on_banner_request_failed_event_cb) (Evas_Object *banner_ad_obj, adlib_err err, void *user_data)
 Called when the banner ad load is failed. More...
 
typedef void(* on_banner_ad_opened_event_cb) (Evas_Object *banner_ad_obj, void *user_data)
 Called when the banner ad is clicked. More...
 
typedef void(* on_interstitial_request_succeeded_event_cb) (void *user_data)
 Called when the interstitial ad load is succeeded. More...
 
typedef void(* on_interstitial_request_failed_event_cb) (adlib_err err, void *user_data)
 Called when the interstitial ad load is failed. More...
 
typedef void(* on_interstitial_ad_opened_event_cb) (void *user_data)
 Called when the interstitial ad is clicked. More...
 
typedef void(* on_interstitial_ad_closed_event_cb) (void *user_data)
 Called when the interstitial ad is closed. More...
 
typedef struct banner_ad_event_cb banner_ad_event_callback_s
 Banner ad event callbacks. More...
 
typedef struct interstitial_ad_event_cb interstitial_ad_event_callback_s
 Interstitial ad event callbacks. More...
 

Enumerations

enum  _adlib_err {
  ADLIB_AD_NO_ERROR,
  ADLIB_AD_INTERNAL_ERROR = 1,
  ADLIB_AD_ADLIB_NOT_INITIALIZED,
  ADLIB_AD_INVALID_AD_HANDLE,
  ADLIB_AD_INVALID_PARAMETERS,
  ADLIB_AD_INVALID_REQUEST,
  ADLIB_AD_NETWORK_ERROR,
  ADLIB_AD_NO_FILL_ERROR
}
 Enumeration for the error codes of adlib. More...
 
enum  adlib_event_type {
  ADLIB_AD_EVENT_REQUEST_FAILED,
  ADLIB_AD_EVENT_REQUEST_SUCCESS,
  ADLIB_AD_EVENT_AD_OPENED,
  ADLIB_AD_EVENT_AD_CLOSED
}
 Enumeration for the event types of adlib. More...
 
enum  _adlib_state_type {
  ADLIB_APP_NONE_STATE,
  ADLIB_APP_PAUSE_STATE,
  ADLIB_APP_RESUME_STATE
}
 Enumeration for the state types of adlib. More...
 
enum  _adlib_gender {
  ADLIB_AD_GENDER_FEMALE,
  ADLIB_AD_GENDER_MALE
}
 Enumeration for the gender used in adlib. More...
 

Functions

EXPORT_API adlib_err adlib_init (const char *banner_site_id, const char *interstitial_site_id, const char *js_namespace, const char *js_src_url, const char *ad_conf_str_name)
 Initializes adlib and its core. More...
 
EXPORT_API void adlib_deinit ()
 Disconnects adlib core and clears networkconnection. More...
 
EXPORT_API void adlib_set_age (int age)
 Set the user's age for targeting purposes. More...
 
EXPORT_API void adlib_set_gender (adlib_gender_e gender)
 Set the user's gender for targeting purposes. More...
 
EXPORT_API void adlib_set_location (char *location)
 Set the user's location for targeting purposes. More...
 
EXPORT_API void adlib_set_interests (char *interests)
 Set the user's interests for targeting purposes. More...
 
EXPORT_API void adlib_set_postal_code (char *postalCode)
 Set the user's postal code for targeting purposes. More...
 
EXPORT_API void adlib_set_area_code (char *areaCode)
 Set the user's area code for targeting purposes. More...
 
EXPORT_API void adlib_set_date_of_birth (char *dob)
 Set the user's date of birth for targeting purposes. More...
 
EXPORT_API void adlib_set_income (char *income)
 Set the user's income group for targeting purposes. More...
 
EXPORT_API void adlib_set_education (char *education)
 Set the user's education for targeting purposes. More...
 
EXPORT_API void adlib_set_ethnicity (char *ethnicity)
 Set the user's ethnicity for targeting purposes. More...
 

Detailed Description

Typedef Documentation

typedef enum _adlib_err adlib_err

Enumeration for the error codes of adlib.

Since
tizen 2.4

Enumeration for the event types of adlib.

Since
tizen 2.4

Enumeration for the gender used in adlib.

Since
tizen 2.4

Enumeration for the state types of adlib.

Since
tizen 2.4

Banner ad event callbacks.

Since
tizen 2.4
typedef struct _banner_addata banner_ad_h

Banner ad handle for handling banner ads.

Since
tizen 2.4

Interstitial ad event callbacks.

Since
tizen 2.4
typedef void(* on_banner_ad_opened_event_cb) (Evas_Object *banner_ad_obj, void *user_data)

Called when the banner ad is clicked.

Since
tizen 2.4
Parameters
[in]banner_ad_objbanner ad object to be used for this ad instance.
[in]user_dataThe user data passed from the callback registration function
Returns
void
See also
banner_ad_event_callback_s
typedef void(* on_banner_request_failed_event_cb) (Evas_Object *banner_ad_obj, adlib_err err, void *user_data)

Called when the banner ad load is failed.

Since
tizen 2.4
Parameters
[in]banner_ad_objbanner ad object to be used for this ad instance.
[in]errThe error code which provides failure details
[in]user_dataThe user data passed from the callback registration function
Returns
void
See also
banner_ad_event_callback_s
typedef void(* on_banner_request_succeeded_event_cb) (Evas_Object *banner_ad_obj, void *user_data)

Called when the banner ad load is succeeded.

Since
tizen 2.4
Parameters
[in]banner_ad_objbanner ad object to be used for this ad instance.
[in]user_dataThe user data passed from the callback registration function
Returns
void
See also
banner_ad_event_callback_s
typedef void(* on_interstitial_ad_closed_event_cb) (void *user_data)

Called when the interstitial ad is closed.

Since
tizen 2.4
Parameters
[in]user_dataThe user data passed from the callback registration function
Returns
void
See also
interstitial_ad_event_callback_s
typedef void(* on_interstitial_ad_opened_event_cb) (void *user_data)

Called when the interstitial ad is clicked.

Since
tizen 2.4
Parameters
[in]user_dataThe user data passed from the callback registration function
Returns
void
See also
interstitial_ad_event_callback_s
typedef void(* on_interstitial_request_failed_event_cb) (adlib_err err, void *user_data)

Called when the interstitial ad load is failed.

Since
tizen 2.4
Parameters
[in]errThe error code which provides failure details
[in]user_dataThe user data passed from the callback registration function
Returns
void
See also
interstitial_ad_event_callback_s
typedef void(* on_interstitial_request_succeeded_event_cb) (void *user_data)

Called when the interstitial ad load is succeeded.

Since
tizen 2.4
Parameters
[in]user_dataThe user data passed from the callback registration function
Returns
void
See also
interstitial_ad_event_callback_s

Enumeration Type Documentation

enum _adlib_err

Enumeration for the error codes of adlib.

Since
tizen 2.4
Enumerator
ADLIB_AD_NO_ERROR 

Successful

ADLIB_AD_INTERNAL_ERROR 

Internal error

ADLIB_AD_ADLIB_NOT_INITIALIZED 

Not initialized

ADLIB_AD_INVALID_AD_HANDLE 

Invalid Ad handle

ADLIB_AD_INVALID_PARAMETERS 

Invalid parameters

ADLIB_AD_INVALID_REQUEST 

Invalid request

ADLIB_AD_NETWORK_ERROR 

Network error

ADLIB_AD_NO_FILL_ERROR 

No fill

Enumeration for the gender used in adlib.

Since
tizen 2.4
Enumerator
ADLIB_AD_GENDER_FEMALE 

Female

ADLIB_AD_GENDER_MALE 

Male

Enumeration for the state types of adlib.

Since
tizen 2.4
Enumerator
ADLIB_APP_NONE_STATE 

No state

ADLIB_APP_PAUSE_STATE 

App paused state

ADLIB_APP_RESUME_STATE 

App resumed state

Enumeration for the event types of adlib.

Since
tizen 2.4
Enumerator
ADLIB_AD_EVENT_REQUEST_FAILED 

Request failed

ADLIB_AD_EVENT_REQUEST_SUCCESS 

Request successful

ADLIB_AD_EVENT_AD_OPENED 

Ad opened

ADLIB_AD_EVENT_AD_CLOSED 

Ad closed

Function Documentation

EXPORT_API void adlib_deinit ( )

Disconnects adlib core and clears networkconnection.

Since
tizen 2.4
Returns
void
EXPORT_API adlib_err adlib_init ( const char *  banner_site_id,
const char *  interstitial_site_id,
const char *  js_namespace,
const char *  js_src_url,
const char *  ad_conf_str_name 
)

Initializes adlib and its core.

Since
tizen 2.4
Parameters
[in]banner_site_idsite id provided for the application by Inmobi during registration for banner ads.
[in]interstitial_site_idsite id provided for the application by Inmobi during registration for interstitial ads.
[in]js_namespacenamespace provided for the application.
[in]js_src_urlsource url provided for the application.
[in]ad_conf_str_nameAd Conf name provided for the application.
Return values
ADLIB_AD_NO_ERRORSuccess.
ADLIB_AD_INTERNAL_ERRORInternal error.
ADLIB_AD_INVALID_PARAMETERSInvalid parameter.
Returns
adlib_err : Returns ADLIB_AD_NO_ERROR on success or with the error occurred.
EXPORT_API void adlib_set_age ( int  age)

Set the user's age for targeting purposes.

Since
tizen 2.4
Parameters
[in]ageThe input age given as preference for fetching ads from server.
EXPORT_API void adlib_set_area_code ( char *  areaCode)

Set the user's area code for targeting purposes.

Since
tizen 2.4
Parameters
[in]areaCodeThe input areaCode given as preference for fetching ads from server.
EXPORT_API void adlib_set_date_of_birth ( char *  dob)

Set the user's date of birth for targeting purposes.

Since
tizen 2.4
Parameters
[in]dobThe input date of birth given as preference for fetching ads from server.
EXPORT_API void adlib_set_education ( char *  education)

Set the user's education for targeting purposes.

Since
tizen 2.4
Parameters
[in]educationThe input education given as preference for fetching ads from server.
EXPORT_API void adlib_set_ethnicity ( char *  ethnicity)

Set the user's ethnicity for targeting purposes.

Since
tizen 2.4
Parameters
[in]ethnicityThe input ethnicity given as preference for fetching ads from server.
EXPORT_API void adlib_set_gender ( adlib_gender_e  gender)

Set the user's gender for targeting purposes.

Since
tizen 2.4
Parameters
[in]genderThe input gender given as preference for fetching ads from server.
EXPORT_API void adlib_set_income ( char *  income)

Set the user's income group for targeting purposes.

Since
tizen 2.4
Parameters
[in]incomeThe input income given as preference for fetching ads from server.
EXPORT_API void adlib_set_interests ( char *  interests)

Set the user's interests for targeting purposes.

Since
tizen 2.4
Parameters
[in]interestsThe input interests given as preference for fetching ads from server.
EXPORT_API void adlib_set_location ( char *  location)

Set the user's location for targeting purposes.

Since
tizen 2.4
Parameters
[in]locationThe input location given as preference for fetching ads from server.
EXPORT_API void adlib_set_postal_code ( char *  postalCode)

Set the user's postal code for targeting purposes.

Since
tizen 2.4
Parameters
[in]postalCodeThe input postalCode given as preference for fetching ads from server.