Media-LibMTP-API

 view release on metacpan or  search on metacpan

lib/Media/LibMTP/API.xs  view on Meta::CPAN

   CODE:
	RETVAL = self->bus_location;
   OUTPUT:
	RETVAL

uint8_t
devnum(self)
	MLA_RawDevice	self
   CODE:
	RETVAL = self->devnum;
   OUTPUT:
	RETVAL

MODULE = Media::LibMTP::API  PACKAGE = Media::LibMTP::API::RawDevice  PREFIX = LIBMTP_

MLA_MTPDeviceList
LIBMTP_Open_Raw_Device(self)
	MLA_RawDevice	self

MLA_MTPDeviceList
LIBMTP_Open_Raw_Device_Uncached(self)
	MLA_RawDevice	self


#--------------------------------------------------------------------
MODULE = Media::LibMTP::API  PACKAGE = Media::LibMTP::API::RawDeviceList

void
DESTROY(self)
	MLA_RawDeviceList	self
   CODE:
	Safefree(self->devices);
	Safefree(self);

int
count(self)
	MLA_RawDeviceList	self
   CODE:
	RETVAL = self->numdevs;
   OUTPUT:
	RETVAL

MLA_RawDevice
_device(self, index)
	MLA_RawDeviceList	self
	int			index
   CODE:
	if (index >= 0 && index < self->numdevs) {
	  RETVAL = self->devices + index;
	} else {
	  RETVAL = NULL;
	}
   OUTPUT:
	RETVAL

void
_devices(self)
	MLA_RawDeviceList	self
   PREINIT:
	int i;
   PPCODE:
	EXTEND(SP, self->numdevs);
	for (i = 0; i < self->numdevs; ++i) {
	  SV* sv = sv_newmortal();
	  sv_setref_pv(sv, "Media::LibMTP::API::RawDevice",
		       (void*)(self->devices + i));
	  PUSHs(sv);
	}


#--------------------------------------------------------------------
MODULE = Media::LibMTP::API  PACKAGE = Media::LibMTP::API::Track

MLA_TrackList
new(class)
	SV *	class
   CODE:
	RETVAL = LIBMTP_new_track_t();
   OUTPUT:
	RETVAL

uint32_t
item_id(self, newValue = NO_INIT)
	MLA_Track	self
	uint32_t	newValue
   CODE:
	if (items > 1)
	  self->item_id = newValue;
	RETVAL = self->item_id;
   OUTPUT:
	RETVAL

uint32_t
parent_id(self, newValue = NO_INIT)
	MLA_Track	self
	uint32_t	newValue
   CODE:
	if (items > 1)
	  self->parent_id = newValue;
	RETVAL = self->parent_id;
   OUTPUT:
	RETVAL

uint32_t
storage_id(self, newValue = NO_INIT)
	MLA_Track	self
	uint32_t	newValue
   CODE:
	if (items > 1)
	  self->storage_id = newValue;
	RETVAL = self->storage_id;
   OUTPUT:
	RETVAL

Utf8String
title(self, newValue = NO_INIT)
	MLA_Track	self
	Utf8String	newValue
   CODE:
	if (items > 1)
	  self->title = strdup(newValue);



( run in 3.668 seconds using v1.01-cache-2.11-cpan-71847e10f99 )