tp_c.h File Reference

#include "defs.h"

Go to the source code of this file.

Classes

struct  _metadata_t

Defines

#define TP_ARTIST_NAME_LEN   255
#define TP_ALBUM_NAME_LEN   255
#define TP_TRACK_NAME_LEN   255
#define TP_ID_LEN   40
#define TP_FORMAT_LEN   32
#define TP_COUNTRY_LEN   3
#define TP_EXTENSION_LEN   32

Typedefs

typedef void * tunepimp_t
typedef void * track_t
typedef void(* tp_notify_callback )(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId, TPFileStatus status)
typedef void(* tp_status_callback )(tunepimp_t pimp, void *data, const char *status)
typedef _metadata_t metadata_t

Functions

tunepimp_t tp_New (const char *appName, const char *appVersion)
tunepimp_t tp_NewWithArgs (const char *appName, const char *appVersion, int startThreads, const char *pluginDir)
void tp_Delete (tunepimp_t o)
void tp_GetVersion (tunepimp_t o, int *major, int *minor, int *rev)
void tp_SetMusicDNSClientId (tunepimp_t o, const char *clientId)
void tp_GetMusicDNSClientId (tunepimp_t o, char *clientId, int maxClientIdLen)
void tp_SetFileNameEncoding (tunepimp_t o, const char *encoding)
void tp_GetFileNameEncoding (tunepimp_t o, char *encoding, int maxEncodingLen)
void tp_SetServer (tunepimp_t o, const char *serverAddr, short serverPort)
void tp_GetServer (tunepimp_t o, char *serverAddr, int maxLen, short *serverPort)
void tp_SetProxy (tunepimp_t o, const char *serverAddr, short serverPort)
void tp_GetProxy (tunepimp_t o, char *serverAddr, int maxLen, short *serverPort)
int tp_GetNumSupportedExtensions (tunepimp_t o)
void tp_GetSupportedExtensions (tunepimp_t o, char extensions[][TP_EXTENSION_LEN])
void tp_SetAnalyzerPriority (tunepimp_t o, TPThreadPriorityEnum priority)
TPThreadPriorityEnum tp_GetAnalyzerPriority (tunepimp_t o)
void tp_SetNotifyCallback (tunepimp_t o, tp_notify_callback callback, void *data)
tp_notify_callback tp_GetNotifyCallback (tunepimp_t o)
int tp_GetNotification (tunepimp_t o, TPCallbackEnum *type, int *fileId, TPFileStatus *status)
void tp_SetStatusCallback (tunepimp_t o, tp_status_callback callback, void *data)
int tp_GetStatus (tunepimp_t o, char *status, int statusLen)
tp_status_callback tp_GetStatusCallback (tunepimp_t o)
void tp_GetError (tunepimp_t o, char *error, int maxLen)
void tp_SetDebug (tunepimp_t o, int debug)
int tp_GetDebug (tunepimp_t o)
int tp_AddFile (tunepimp_t o, const char *fileName, int readMetadataNow)
int tp_AddDir (tunepimp_t o, const char *dirPath)
void tp_Remove (tunepimp_t o, int fileId)
int tp_GetNumFiles (tunepimp_t o)
int tp_GetNumUnsavedItems (tunepimp_t o)
int tp_GetTrackCounts (tunepimp_t o, int *counts, int maxCounts)
int tp_GetNumFileIds (tunepimp_t o)
void tp_GetFileIds (tunepimp_t o, int *ids, int numIds)
track_t tp_GetTrack (tunepimp_t o, int fileId)
void tp_ReleaseTrack (tunepimp_t o, track_t track)
void tp_Wake (tunepimp_t o, track_t track)
void tp_Misidentified (tunepimp_t o, int fileId)
void tp_IdentifyAgain (tunepimp_t o, int fileId)
int tp_WriteTags (tunepimp_t o, int *fileIds, int numFileIds)
void tp_SetRenameFiles (tunepimp_t o, int rename)
int tp_GetRenameFiles (tunepimp_t o)
void tp_SetMoveFiles (tunepimp_t o, int move)
int tp_GetMoveFiles (tunepimp_t o)
void tp_SetWriteID3v1 (tunepimp_t o, int writeID3v1)
int tp_GetWriteID3v1 (tunepimp_t o)
void tp_SetWriteID3v2_3 (tunepimp_t o, int writeID3v2_3)
int tp_GetWriteID3v2_3 (tunepimp_t o)
void tp_SetID3Encoding (tunepimp_t o, TPID3Encoding encoding)
TPID3Encoding tp_GetID3Encoding (tunepimp_t o)
void tp_SetClearTags (tunepimp_t o, int clearTags)
int tp_GetClearTags (tunepimp_t o)
void tp_SetFileMask (tunepimp_t o, const char *fileMask)
void tp_GetFileMask (tunepimp_t o, char *fileMask, int maxLen)
void tp_SetVariousFileMask (tunepimp_t o, const char *variousFileMask)
void tp_GetVariousFileMask (tunepimp_t o, char *variousFileMask, int maxLen)
void tp_SetNonAlbumFileMask (tunepimp_t o, const char *nonAlbumFileMask)
void tp_GetNonAlbumFileMask (tunepimp_t o, char *nonAlbumFileMask, int maxLen)
void tp_SetAllowedFileCharacters (tunepimp_t o, const char *allowedFileCharacters)
void tp_GetAllowedFileCharacters (tunepimp_t o, char *allowedFileCharacters, int maxLen)
void tp_SetDestDir (tunepimp_t o, const char *destDir)
void tp_GetDestDir (tunepimp_t o, char *destDir, int maxLen)
void tp_SetTopSrcDir (tunepimp_t o, const char *topSrcDir)
void tp_GetTopSrcDir (tunepimp_t o, char *topSrcDir, int maxLen)
void tp_SetAutoSaveThreshold (tunepimp_t o, int autoSaveThreshold)
int tp_GetAutoSaveThreshold (tunepimp_t o)
void tp_SetMaxFileNameLen (tunepimp_t o, int maxFileNameLen)
int tp_GetMaxFileNameLen (tunepimp_t o)
void tp_SetAutoRemovedSavedFiles (tunepimp_t o, int autoRemoveSavedFiles)
int tp_GetAutoRemovedSavedFiles (tunepimp_t o)
int tp_GetRecognizedFileList (tunepimp_t o, int threshold, int **fileIds, int *numIds)
void tp_DeleteRecognizedFileList (tunepimp_t o, int *fileIds)
int tp_GetWinSafeFileNames (tunepimp_t o)
void tp_SetWinSafeFileNames (tunepimp_t o, int winSafeFileNames)
TPFileStatus tr_GetStatus (track_t t)
void tr_SetStatus (track_t t, const TPFileStatus status)
void tr_GetFileName (track_t t, char *fileName, int maxLen)
void tr_GetPUID (track_t t, char *puid, int maxLen)
void tr_GetLocalMetadata (track_t t, metadata_t *mdata)
void tr_SetLocalMetadata (track_t t, const metadata_t *mdata)
void tr_GetServerMetadata (track_t t, metadata_t *mdata)
void tr_SetServerMetadata (track_t t, const metadata_t *mdata)
void tr_GetError (track_t t, char *error, int maxLen)
int tr_GetSimilarity (track_t t)
int tr_HasChanged (track_t t)
void tr_SetChanged (track_t t)
void tr_Lock (track_t t)
void tr_Unlock (track_t t)
metadata_tmd_New (void)
void md_Delete (metadata_t *mdata)
void md_Clear (metadata_t *mdata)
int md_Compare (const metadata_t *mdataA, const metadata_t *mdataB)
TPAlbumStatus md_ConvertToAlbumStatus (const char *albumStatus)
TPAlbumType md_ConvertToAlbumType (const char *albumType)
void md_ConvertFromAlbumStatus (TPAlbumStatus status, char *albumStatus, int maxLen)
void md_ConvertFromAlbumType (TPAlbumType type, char *albumType, int maxLen)
float md_Similarity (const char *a, const char *b)


Define Documentation

#define TP_ALBUM_NAME_LEN   255
 

#define TP_ARTIST_NAME_LEN   255
 

This structure holds the meta data of a track.

The meanings of most attributes are pretty straight forward, but a few need additional explanations. Strings like artist, sortName, album etc. are never NULL. If the information isn't available, the attribute is set to the empty string ("").

The duration attribute is in milliseconds. fileFormat is one of the supported file formats (see tp_GetSupportedExtensions()) but without the dot ("mp3", "ogg", "wav" etc.). If there was a PUID collision, numPUIDIds is set to a value greater than one. If variousArtist is true, the track is from a various artists release. If nonAlbum is true, the track resides within a special non-album tracklisting.

The memory containing the meta data will be released when calling md_Clear() or md_Delete(), so you have to copy the data if you want to use it.

See also:
md_New(), md_Clear(), md_Delete() tr_GetLocalMetadata(), tr_SetLocalMetadata(), tr_GetServerMetadata(), tr_SetServerMetadata()

#define TP_COUNTRY_LEN   3
 

#define TP_EXTENSION_LEN   32
 

This function returns a list of supported audio formats. The elements of the list are the usual filename extensions like ".wav", ".mp3", ".ogg" etc.

The buffer you pass to the function has to be big enough to hold the list. You can use tp_GetNumSupportedExtensions() to get the number of supported extensions.

Parameters:
o the tunepimp_t object returned from tp_New()
extensions a user supplied buffer for the list of filename extensions
See also:
tp_GetNumSupportedExtensions()

#define TP_FORMAT_LEN   32
 

#define TP_ID_LEN   40
 

#define TP_TRACK_NAME_LEN   255
 


Typedef Documentation

typedef struct _metadata_t metadata_t
 

typedef void(* tp_notify_callback)(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId, TPFileStatus status)
 

This is the signature definition of a function suitable as a notification callback. The data argument is the pointer that the user gave when registering the function using tp_SetNotifyCallback().

Parameters:
pimp the tunepimp object that invoked the callback function
data a pointer to user data set when registering the callback
type the type of this notification
fileId the Id of the file concerned
See also:
tp_SetNotifyCallback()

typedef void(* tp_status_callback)(tunepimp_t pimp, void *data, const char *status)
 

This is the signature definition of a function suitable as a status callback. The data argument is the pointer that the user gave when registering the function using tp_SetStatusCallback().

Parameters:
pimp the tunepimp object that invoked the callback function
data a pointer to user data set when registering the callback
status a pointer to a text message
See also:
tp_SetStatusCallback()

typedef void* track_t
 

The abstraction of a Track object. Functions to manipulate have a prefix of "tr_".

typedef void* tunepimp_t
 

tunepimp_t is the basic C abstraction for a TunePimp Object. It is completely transparent for the user. Don't try to manipulate it manually, use one of the functions starting with "tp_".


Function Documentation

void md_Clear metadata_t mdata  ) 
 

Clears a metadata_t object.

All values of the object are set to NULL values. After that the object is in the same state as directly after md_New().

Parameters:
mdata a valid metadata_t object
See also:
md_New(), md_Delete()

int md_Compare const metadata_t mdataA,
const metadata_t mdataB
 

Compare two metadata_t objects and return a similarity value between 0.0 and 1.0, where zero is totally dissimilar and 1.0 is exactly the same.

Parameters:
mdataA a valid metadata_t object
mdataB a valid metadata_t object

void md_ConvertFromAlbumStatus TPAlbumStatus  status,
char *  albumStatus,
int  maxLen
 

Convert the status of an album to its textual representation. The function stores the status string in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

Parameters:
status an album status
albumStatus a user supplied buffer of maxLen characters
maxLen the size of the buffer
See also:
md_ConvertToAlbumStatus()

void md_ConvertFromAlbumType TPAlbumType  type,
char *  albumType,
int  maxLen
 

Convert the type of an album to its textual representation. The function stores the type string in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

Parameters:
type an album type
albumType a user supplied buffer of maxLen characters
maxLen the size of the buffer
See also:
md_ConvertToAlbumType()

TPAlbumStatus md_ConvertToAlbumStatus const char *  albumStatus  ) 
 

Converts a string to TPAlbumStatus. The string's value has to be one of "official", "promotion" or "bootleg". Case doesn't matter.

Parameters:
albumStatus the string to convert
Returns:
an album status or eAlbumStatus_Error on error
See also:
md_ConvertToAlbumType()

TPAlbumType md_ConvertToAlbumType const char *  albumType  ) 
 

Converts a string to TPAlbumType. The string's value has to be one of "album", "single", "compilation", "soundtrack", "spokenword", "audiobook", "live" or "other". Case doesn't matter.

Parameters:
albumType the string to convert
Returns:
an album type or eAlbumType_Error on error
See also:
md_ConvertToAlbumStatus()

void md_Delete metadata_t mdata  ) 
 

Delete a metadata_t object.

Parameters:
mdata a valid metadata_t object
See also:
md_Clear()

metadata_t* md_New void   ) 
 

Create a new metadata_t object.

Don't forget to release it using md_Delete() when you don't need it any longer.

Returns:
a new metadata_t object
See also:
md_Clear()

float md_Similarity const char *  a,
const char *  b
 

Does a fuzzy string comparison and returns the similarity value between 0.0 and 1.0

Parameters:
a the first string
b the second string
Returns:
a float value from 0.0 (completely dissimilar strings) to 1.0 (the exact same strings)

int tp_AddDir tunepimp_t  o,
const char *  dirPath
 

This function descends recursively into the specified directory and adds all files to the list that look like they contain music, judging by comparing file extensions. You can get a list of supported file formats using tp_GetSupportedExtensions().

Parameters:
o the tunepimp_t object returned from tp_New
dirPath a string containing a path
Returns:
the number of files found, -1 on error
See also:
tp_Add(), tp_GetSupportedExtensions()

int tp_AddFile tunepimp_t  o,
const char *  fileName,
int  readMetadataNow
 

Add a file to the list. The fileId of the added file is returned which is a handle that is valid until the file is removed using tp_Remove() or TunePimp writes new metadata tags and automatically removes the file. Adding a file that is already in the list is a no-op. Initially, the status of a file is ePending.

For each file added, your registered notification callback is invoked. Its parameters are tpFileAdded and the fileId returned by tp_Add().

Please note that tp_AddFile() always succeeds, no matter if the file isn't a recognized audio file, if it isn't readable or doesn't exist at all. However, you can always query the track's status to see if there was an error.

Parameters:
o the tunepimp_t object returned from tp_New
fileName a string containing a filename
readMetadataNow read the file metadata before returning
Returns:
a fileId handle for your file
See also:
tp_AddDir(), tp_SetNotifyCallback()

void tp_Delete tunepimp_t  o  ) 
 

The destructor for the TunePimp class.

Parameters:
o the handle for the tunepimp_t object to delete
See also:
tp_New()

void tp_DeleteRecognizedFileList tunepimp_t  o,
int *  fileIds
 

Release the memory allocated by tp_GetRecognizedFileList(). You can use this function even if there were no fileIds returned.

Parameters:
o the tunepimp_t object returned from tp_New()
fileIds the array returned by tp_GetRecognizedFileList()
See also:
tp_GetRecognizedFileList()

void tp_GetAllowedFileCharacters tunepimp_t  o,
char *  allowedFileCharacters,
int  maxLen
 

Use this function to get a string containing the characters allowed in a file name. This function stores the string in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

If all characters are allowed, the empty string ("") is returned.

Parameters:
o the tunepimp_t object returned from tp_New()
allowedFileCharacters a user supplied buffer of maxLen characters
maxLen the size of the buffer
See also:
tp_SetAllowedFileCharacters()

TPThreadPriorityEnum tp_GetAnalyzerPriority tunepimp_t  o  ) 
 

This function gets the analyzer thread priority level.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
The current analyzer thread priorty. See include/defs.h for possible return codes.
See also:
tp_SetAnalyzerPriority()

int tp_GetAutoRemovedSavedFiles tunepimp_t  o  ) 
 

Use this function to determine if the tunepimp library automatically deletes files after they've been saved or if it moves them to the eSaved status.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
if tunepimp is auto removing files
See also:
tp_SetAutoRemovedSavedFiles()

int tp_GetAutoSaveThreshold tunepimp_t  o  ) 
 

Get the autosave threshold if autosave is enabled or a negative value if the feature is disabled. See tp_SetAutoSaveThreshold() for an explanation of the autosave feature.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
the autosave threshold or a negative number of disabled
See also:
tp_SetAutoSaveThreshold()

int tp_GetClearTags tunepimp_t  o  ) 
 

Query the tunepimp object if tag clearing is enabled. See tp_SetClearTags() for more information.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
true if the tag clearing is enabled and false otherwise
See also:
tp_SetClearTags()

int tp_GetDebug tunepimp_t  o  ) 
 

Check if debugging is enabled.

Parameters:
o the tunepimp_t object returned from tp_New
Returns:
true if debuggin is enabled and false otherwise
See also:
tp_SetDebug()

void tp_GetDestDir tunepimp_t  o,
char *  destDir,
int  maxLen
 

Use this function to get a string containing the destination directory. tp_GetDestDir() stores the string in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

Parameters:
o the tunepimp_t object returned from tp_New()
destDir a user supplied buffer of maxLen characters
maxLen the size of the buffer
See also:
tp_SetDestDir()

void tp_GetError tunepimp_t  o,
char *  error,
int  maxLen
 

Use this function to get a printable error message for the last error that occured in the tunepimp object. tp_GetError() stores the error string in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

Parameters:
o the tunepimp_t object returned from tp_New()
error a user supplied buffer of maxLen characters
maxLen the size of the buffer

void tp_GetFileIds tunepimp_t  o,
int *  ids,
int  numIds
 

Returns the fileIds in tunepimp's list. At most numIds are returned.

Use tp_GetNumFileIds to get the number of fileIds in the list. Do not use tp_Add() or tp_AddDir() between calls to tp_GetNumFileIds() and tp_GetFileIds().

Parameters:
o the tunepimp_t object returned from tp_New()
numIds the number of fileIds the buffer can receive
ids a poiner to the buffer that will receive the fileIds
See also:
tp_GetNumFileIds()

void tp_GetFileMask tunepimp_t  o,
char *  fileMask,
int  maxLen
 

Use this function to get a string containing the file mask. tp_GetFileMask() stores the string in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

Parameters:
o the tunepimp_t object returned from tp_New()
fileMask a user supplied buffer of maxLen characters
maxLen the size of the buffer
See also:
tp_SetFileMask()

void tp_GetFileNameEncoding tunepimp_t  o,
char *  encoding,
int  maxEncodingLen
 

Parameters:
o the tunepimp_t object returned from tp_New()
encoding the encoding to use.
maxEncodingLen length of the encoding string
See also:
tp_SetFileNameEncoding()

TPID3Encoding tp_GetID3Encoding tunepimp_t  o  ) 
 

Check which encoding is set for writing ID3v2 tags.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
one of eLatin1, eUTF8 or eUTF16
See also:
tp_SetID3Encoding()

int tp_GetMaxFileNameLen tunepimp_t  o  ) 
 

Use this function to get the current maximum filename length

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
the current maximum filename length
See also:
tp_SetMaxFileNameLen()

int tp_GetMoveFiles tunepimp_t  o  ) 
 

Check if file moving is enabled. See tp_SetMoveFiles() for more information.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
true if file moving was enabled and false otherwise
See also:
tp_SetMoveFiles()

void tp_GetMusicDNSClientId tunepimp_t  o,
char *  clientId,
int  maxClientIdLen
 

Get the MusicDNS clientId that was set with the tp_SetMusicDNSClientId function.

Parameters:
o the tunepimp_t object returned from tp_New()
clientId a user supplied buffer of maxClientIdLen characters
maxClientIdLen the max size of the buffer for the client name

void tp_GetNonAlbumFileMask tunepimp_t  o,
char *  nonAlbumFileMask,
int  maxLen
 

Use this function to get a string containing the various artists file mask. tp_GetVariousFileMask() stores the string in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

Parameters:
o the tunepimp_t object returned from tp_New()
nonAlbumFileMask a user supplied buffer of maxLen characters
maxLen the size of the buffer
See also:
tp_SetNonAlbumFileMask()

int tp_GetNotification tunepimp_t  o,
TPCallbackEnum type,
int *  fileId,
TPFileStatus status
 

Get a notification message from tunepimp's queue. All messages are stored in a queue (FIFO) to make sure you get them in the right order.

Please note that this function only returns notification messages if no notification callback was set.

Parameters:
o the tunepimp_t object returned from tp_New()
type the address of a variable to receive the notification type
fileId the address of a variable to receive the fileId
status the address of a variable to receive the current status
Returns:
true if there was a notification message in the queue and false otherwise
See also:
tp_SetNotifyCallback(), tp_GetNotifyCallback()

tp_notify_callback tp_GetNotifyCallback tunepimp_t  o  ) 
 

Get the function registered to receive notification messages. See tp_SetNotifyCallback() for more information.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
the previously registered callback or NULL if none was registered
See also:
tp_SetNotifyCallback()

int tp_GetNumFileIds tunepimp_t  o  ) 
 

Get the number of filesIds that a call to tp_GetFileIds() would return.

Do not use tp_Add() or tp_AddDir() between calls to tp_GetNumFileIds() and tp_GetFileIds(). They might increase the number of fileIds.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
the number of fileIds
See also:
tp_GetFileIds()

int tp_GetNumFiles tunepimp_t  o  ) 
 

This function returns the number of files that tunepimp has in its list.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
the number of files in the list
See also:
tp_Add(), tp_AddDir(), tp_Remove()

int tp_GetNumSupportedExtensions tunepimp_t  o  ) 
 

Query the number of audio file formats supported by tunepimp. The number depends on which libraries were present when tunepimp was compiled.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
the number of supported audio file formats
See also:
tp_GetSupportedExtensions()

int tp_GetNumUnsavedItems tunepimp_t  o  ) 
 

This function returns the number of track that have been recognized and are ready to be saved.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
the number of tracks not saved

void tp_GetProxy tunepimp_t  o,
char *  serverAddr,
int  maxLen,
short *  serverPort
 

Get the proxy settings. tp_GetProxy() stores the address in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

If no proxy was set, serverAddr is set to the empty string ("").

Parameters:
o the tunepimp_t object returned from tp_New()
serverAddr a user supplied buffer of maxLen characters
maxLen the size of the buffer
serverPort the address of a variable to receive the port
See also:
tp_SetProxy()

int tp_GetRecognizedFileList tunepimp_t  o,
int  threshold,
int **  fileIds,
int *  numIds
 

Get a list of recognized files (eRecognized) that have a similarity value of less than threshold. If such files were found, the function allocates an array of ints and returns it using the fileIds argument. The number of entries in the array can be found in the numIds argument.

Don't forget to free the allocated memory using tp_DeleteRecognizedFileList().

Parameters:
o the tunepimp_t object returned from tp_New()
threshold a threshold (between 0 and 100)
fileIds the address of an int pointer
numIds the address of a variable to receive the number of IDs returned
Returns:
true if there were matching files and false otherwise
See also:
tp_DeleteRecognizedFileList()

int tp_GetRenameFiles tunepimp_t  o  ) 
 

Query the tunepimp object if file renaming is enabled. See tp_SetRenameFiles() for an explanation.

Parameters:
o the tunepimp_t object returned from tp_New()
Returns:
true if file renaming was enabled and false otherwise
See also:
tp_SetRenameFiles()

void tp_GetServer tunepimp_t  o,
char *  serverAddr,
int  maxLen,
short *  serverPort
 

Get the server settings. tp_GetServer() stores the address in a user supplied buffer. Not more than maxLen characters including the trailing '\0' byte are copied into that buffer.

If no proxy was set, serverAddr is set to the empty string ("").

Parameters:
o the tunepimp_t object returned from tp_New()
serverAddr a user supplied buffer of maxLen characters
maxLen the size of the buffer
serverPort the address of a variable to receive the port
See also:
tp_SetServer()

int tp_GetStatus tunepimp_t  o,
char *  status,
int