YGetSoundObjectAttributes(3) Sound object attributes

SYNTAX

#include <Y2/Y.h>
#include <Y2/Ylib.h>

int YGetSoundObjectAttributes(

        YConnection *connection,

        const char *path,

        YEventSoundObjectAttributes *buf
)

ARGUMENTS

connection
Specifies the connection to the Y server, obtained by a call to YOpenConnection.
path
Specifies the path (in UNIX path notation) to the sound object on the VFS (virtual file system) of the machine that the Y server is running on. If the path is not absolute, then a set of search paths defined on the Y server will be searched through.
buf
Specifies the pointer to the buffer to put the sound object attrbiutes in. See YEventSoundObjectAttributes for more information about this structure.

DESCRIPTION

The YGetSoundObjectAttributes function fetches the attributes for the sound object specified by path and stores the values in the buffer pointer to by buf.

RETURN VALUE

The YGetSoundObjectAttributes function returns -1 if the sound object does not exist/is not accessible or 0 on success.

EXAMPLE

#include <stdio.h>
#include <Y2/Y.h>
#include <Y2/Ylib.h>

int main(int argc, char *argv[])
{

        YEventSoundObjectAttributes buf;

        YConnection *con = YOpenConnection(

                "/usr/sbin/starty",

                "127.0.0.1:9433"

        );

        if(con == NULL)

                return(1);


        if(YGetSoundObjectAttributes(

                con, "/usr/share/sounds/info.wav", &buf

        ))

                printf("Failed.\n");

        else

                printf("Success.\n");


        YCloseConnection(con, False);


        return(0);
}