tv-service  0.1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tv_service_proxy_scan.h File Reference

Go to the source code of this file.

Data Structures

struct  TvServiceScanEventData
 

Typedefs

typedef void * TvServiceScan
 
typedef void(* TvServiceScanCallback )(TvServiceScanEvent type, TvServiceScanEventData *data, gpointer user_data)
 

Enumerations

enum  TvServiceScanType {
  TVS_SCAN_AIR_ANALOG = 0, TVS_SCAN_AIR_DIGITAL, TVS_SCAN_AIR_ANALOG_DIGITAL, TVS_SCAN_CABLE_ANALOG,
  TVS_SCAN_CABLE_DIGITAL, TVS_SCAN_CABLE_ANALOG_DIGITAL, TVS_SCAN_ALL_ANALOG, TVS_SCAN_ALL_DIGITAL,
  TVS_SCAN_ALL_ANALOG_DIGITAL, TVS_SCAN_TYPE_MAX
}
 
enum  TvServiceScanSearchFinishType { TVS_SCAN_SEARCH_FINISH_STOPPED = 0, TVS_SCAN_SEARCH_FINISH_COMPLETE }
 
enum  TvServiceScanEvent { TVS_SCAN_EVENT_SEARCH_BEGIN = 0, TVS_SCAN_EVENT_SEARCH_CHANNEL, TVS_SCAN_EVENT_CHANNEL_FOUND, TVS_SCAN_EVENT_SEARCH_FINISH }
 

Functions

gint tv_service_scan_create (TvServiceScan *scan, TvServiceScanType type)
 
gint tv_service_scan_destroy (TvServiceScan scan)
 
gint tv_service_scan_start (TvServiceScan scan)
 
gint tv_service_scan_stop (TvServiceScan scan)
 
gint tv_service_scan_pause (TvServiceScan scan)
 
gint tv_service_scan_resume (TvServiceScan scan)
 
gint tv_service_scan_register_callback (TvServiceScan scan, TvServiceScanCallback callback_func, gpointer user_data)
 

Detailed Description

This API is not official tv-service API. It can always be changed without announcement.

Typedef Documentation

typedef void* TvServiceScan
typedef void(* TvServiceScanCallback)(TvServiceScanEvent type, TvServiceScanEventData *data, gpointer user_data)

Enumeration Type Documentation

An enumeration. Enumeration for event type.

Enumerator:
TVS_SCAN_EVENT_SEARCH_BEGIN 

*Sent whenever scanning some channel is started. *param.l[0]: total air number; *param.l[1]: total cable number;

TVS_SCAN_EVENT_SEARCH_CHANNEL 

*Sent whenever scanning some channel is started. *param.l[0]: channel number (PTC); *param.l[1]: frequency;

TVS_SCAN_EVENT_CHANNEL_FOUND 

*Sent whenever channel is found. *param.s[0]: antenna type; *param.s[1]: digital type; *param.s[2]: number of atv channels found *param.s[3]: number of dtv channels found

TVS_SCAN_EVENT_SEARCH_FINISH 

Sent when channel search is ended for some reason. param.l[0]: TVS_SCAN_SEARCH_FINISH_STOPPED / TVS_SCAN_SEARCH_FINISH_COMPLETE the reason that channel search finish.

An enumeration. Enumeration for TVS_SCAN_EVENT_SEARCH_FINISH event.

Enumerator:
TVS_SCAN_SEARCH_FINISH_STOPPED 
TVS_SCAN_SEARCH_FINISH_COMPLETE 

An enumeration. Enumeration for scan type.

Enumerator:
TVS_SCAN_AIR_ANALOG 
TVS_SCAN_AIR_DIGITAL 
TVS_SCAN_AIR_ANALOG_DIGITAL 
TVS_SCAN_CABLE_ANALOG 
TVS_SCAN_CABLE_DIGITAL 
TVS_SCAN_CABLE_ANALOG_DIGITAL 
TVS_SCAN_ALL_ANALOG 
TVS_SCAN_ALL_DIGITAL 
TVS_SCAN_ALL_ANALOG_DIGITAL 
TVS_SCAN_TYPE_MAX 

Function Documentation

gint tv_service_scan_create ( TvServiceScan scan,
TvServiceScanType  type 
)

tv_service_scan_create:

*This function is to create a player object for scan.

Parameters
scan[in] handle of scan
type[in] scan type
Returns
This function returns zero on success, or negative value with error code.
See Also
None.
Remarks
None.
Examples:
tv_service_channel_change_notify_test.c, and tv_service_scan_test.c.
gint tv_service_scan_destroy ( TvServiceScan  scan)

tv_service_scan_destroy:

*This function is to release all resources which are created by tv player.

Parameters
scan[in] handle of scan
Returns
This function returns zero on success, or negative value with error code.
See Also
None.
Remarks
None.
Examples:
tv_service_channel_change_notify_test.c, and tv_service_scan_test.c.
gint tv_service_scan_pause ( TvServiceScan  scan)

tv_service_scan_pause:

*This function is to notify pausing scan

Parameters
scan[in] handle of scan
Returns
This function returns zero on success, or negative value with error code.
See Also
None.
Remarks
None.
Examples:
tv_service_scan_test.c.
gint tv_service_scan_register_callback ( TvServiceScan  scan,
TvServiceScanCallback  callback_func,
gpointer  user_data 
)

tv_service_scan_register_callback:

*This function is to add callback function to handle scan event

Parameters
scan[in] handle of scan
callback_func[in] scan callback function
user_data[in] user data
Returns
This function returns zero on success, or negative value with error code.
See Also
None.
Remarks
None.
Examples:
tv_service_channel_change_notify_test.c, and tv_service_scan_test.c.
gint tv_service_scan_resume ( TvServiceScan  scan)

tv_service_scan_resume:

*This function is to notify resuming scan

Parameters
scan[in] handle of scan
Returns
This function returns zero on success, or negative value with error code.
See Also
None.
Remarks
None.
Examples:
tv_service_scan_test.c.
gint tv_service_scan_start ( TvServiceScan  scan)

tv_service_scan_start:

*This function is to notify starting scan

Parameters
scan[in] handle of scan
Returns
This function returns zero on success, or negative value with error code.
See Also
None.
Remarks
None.
Examples:
tv_service_channel_change_notify_test.c, and tv_service_scan_test.c.
gint tv_service_scan_stop ( TvServiceScan  scan)

tv_service_scan_stop:

*This function is to notify stopping scan

Parameters
scan[in] handle of scan
Returns
This function returns zero on success, or negative value with error code.
See Also
None.
Remarks
None.