Changeset 5109:4f9fc788fe91 in roaraudio for include/libroar/stream.h


Ignore:
Timestamp:
07/28/11 16:32:34 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Started to use compiler attributes (Also see: #130)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/stream.h

    r4883 r5109  
    3939#include "roaraudio.h" 
    4040 
    41 const char * roar_dir2str (const int dir); 
    42 int    roar_str2dir (const char * name); 
     41#define _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL 
     42 
     43const char * roar_dir2str (const int dir) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; 
     44int    roar_str2dir (const char * name) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL _LIBROAR_ATTR_PURE; 
    4345 
    4446struct roar_stream_info { 
     
    5557}; 
    5658 
    57 int roar_stream_connect  (struct roar_connection * con, struct roar_stream * s, int dir); 
    58 int roar_stream_connect2 (struct roar_connection * con, struct roar_stream * s, int dir, int mixer); 
     59int roar_stream_connect  (struct roar_connection * con, struct roar_stream * s, int dir) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
     60int roar_stream_connect2 (struct roar_connection * con, struct roar_stream * s, int dir, int mixer) _LIBROAR_STREAM_STDATTRS; 
    5961 
    60 int roar_stream_new     (struct roar_stream * s, unsigned int rate, unsigned int channels, unsigned int bits, unsigned int codec); 
     62int roar_stream_new     (struct roar_stream * s, unsigned int rate, unsigned int channels, unsigned int bits, unsigned int codec) _LIBROAR_ATTR_NONNULL_ALL; 
    6163 
    62 int roar_stream_set_rel_id(struct roar_stream * s, int id); 
    63 int roar_stream_get_rel_id(struct roar_stream * s); 
     64int roar_stream_set_rel_id(struct roar_stream * s, int id) _LIBROAR_ATTR_NONNULL_ALL; 
     65int roar_stream_get_rel_id(struct roar_stream * s) _LIBROAR_STREAM_STDATTRS; 
    6466 
    65 int roar_stream_new_by_id(struct roar_stream * s, int id); 
    66 int roar_stream_new_empty(struct roar_stream * s); 
     67int roar_stream_new_by_id(struct roar_stream * s, int id) _LIBROAR_ATTR_NONNULL_ALL; 
     68int roar_stream_new_empty(struct roar_stream * s) _LIBROAR_STREAM_STDATTRS; 
    6769 
    68 int roar_stream_set_id (struct roar_stream * s, int id); 
    69 int roar_stream_get_id (struct roar_stream * s); 
     70int roar_stream_set_id (struct roar_stream * s, int id) _LIBROAR_ATTR_NONNULL_ALL; 
     71int roar_stream_get_id (struct roar_stream * s) _LIBROAR_STREAM_STDATTRS; 
    7072 
    71 int roar_stream_set_fh (struct roar_stream * s, int fh); 
    72 int roar_stream_get_fh (struct roar_stream * s); 
     73int roar_stream_set_fh (struct roar_stream * s, int fh) _LIBROAR_ATTR_NONNULL_ALL; 
     74int roar_stream_get_fh (struct roar_stream * s) _LIBROAR_STREAM_STDATTRS; 
    7375 
    74 int roar_stream_set_dir (struct roar_stream * s, int dir); 
    75 int roar_stream_get_dir (struct roar_stream * s); 
     76int roar_stream_set_dir (struct roar_stream * s, int dir) _LIBROAR_ATTR_NONNULL_ALL; 
     77int roar_stream_get_dir (struct roar_stream * s) _LIBROAR_STREAM_STDATTRS; 
    7678 
    77 int roar_stream_exec    (struct roar_connection * con, struct roar_stream * s); 
     79int roar_stream_exec    (struct roar_connection * con, struct roar_stream * s) _LIBROAR_STREAM_STDATTRS; 
    7880int roar_stream_connect_to (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port); 
    7981int roar_stream_connect_to_ask (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port); 
    80 int roar_stream_passfh  (struct roar_connection * con, struct roar_stream * s, int fh); 
     82int roar_stream_passfh  (struct roar_connection * con, struct roar_stream * s, int fh) _LIBROAR_STREAM_STDATTRS; 
    8183 
    82 int roar_stream_attach_simple (struct roar_connection * con, struct roar_stream * s, int client); 
     84int roar_stream_attach_simple (struct roar_connection * con, struct roar_stream * s, int client) _LIBROAR_STREAM_STDATTRS; 
    8385 
    84 int roar_stream_add_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len); 
     86int roar_stream_add_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
    8587 
    86 int roar_stream_send_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len); 
     88int roar_stream_send_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
    8789 
    88 int roar_stream_get_info (struct roar_connection * con, struct roar_stream * s, struct roar_stream_info * info); 
    89 int roar_stream_get_name (struct roar_connection * con, struct roar_stream * s, char * name, size_t len); 
     90int roar_stream_get_info (struct roar_connection * con, struct roar_stream * s, struct roar_stream_info * info) _LIBROAR_STREAM_STDATTRS; 
     91int roar_stream_get_name (struct roar_connection * con, struct roar_stream * s, char * name, size_t len) _LIBROAR_STREAM_STDATTRS; 
    9092 
    91 int roar_stream_get_chanmap (struct roar_connection * con, struct roar_stream * s, char * map, size_t * len); 
    92 int roar_stream_set_chanmap (struct roar_connection * con, struct roar_stream * s, char * map, size_t   len); 
     93int roar_stream_get_chanmap (struct roar_connection * con, struct roar_stream * s, char * map, size_t * len) _LIBROAR_STREAM_STDATTRS; 
     94int roar_stream_set_chanmap (struct roar_connection * con, struct roar_stream * s, char * map, size_t   len) _LIBROAR_STREAM_STDATTRS; 
    9395 
    94 int roar_stream_set_flags  (struct roar_connection * con, struct roar_stream * s, int flags, int reset); 
    95 int roar_stream_set_flags2 (struct roar_connection * con, struct roar_stream * s, uint32_t flags, int action); 
     96int roar_stream_set_flags  (struct roar_connection * con, struct roar_stream * s, int flags, int reset) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
     97int roar_stream_set_flags2 (struct roar_connection * con, struct roar_stream * s, uint32_t flags, int action) _LIBROAR_STREAM_STDATTRS; 
    9698 
    97 int roar_stream_set_role  (struct roar_connection * con, struct roar_stream * s, int role); 
     99int roar_stream_set_role  (struct roar_connection * con, struct roar_stream * s, int role) _LIBROAR_STREAM_STDATTRS; 
    98100 
    99101int roar_stream_s2m     (struct roar_stream * s, struct roar_message * m); 
    100102int roar_stream_m2s     (struct roar_stream * s, struct roar_message * m); 
    101103 
    102 int    roar_str2codec (const char * codec); 
    103 const char * roar_codec2str (const int    codec); 
     104int    roar_str2codec (const char * codec) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     105const char * roar_codec2str (const int    codec) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; 
    104106 
    105 int    roar_mime2codec (const char * mime); 
    106 const char * roar_codec2mime (const int    codec); 
     107int    roar_mime2codec (const char * mime) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     108const char * roar_codec2mime (const int    codec) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; 
    107109 
    108 int32_t roar_str2rate(const char * rate); 
    109 int32_t roar_str2bits(const char * bits); 
    110 int32_t roar_str2channels(const char * channels); 
     110int32_t roar_str2rate(const char * rate) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     111int32_t roar_str2bits(const char * bits) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     112int32_t roar_str2channels(const char * channels) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
    111113 
    112 const char * roar_streamstate2str(int streamstate); 
     114const char * roar_streamstate2str(int streamstate) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; 
    113115 
    114 int    roar_str2role  (const char * role); 
    115 const char * roar_role2str  (const int    role); 
     116int    roar_str2role  (const char * role) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     117const char * roar_role2str  (const int    role) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; 
    116118 
    117 ssize_t roar_info2samplesize (struct roar_audio_info * info); 
    118 ssize_t roar_info2framesize  (struct roar_audio_info * info); 
    119 ssize_t roar_info2bitspersec (struct roar_audio_info * info); 
     119ssize_t roar_info2samplesize (struct roar_audio_info * info) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     120ssize_t roar_info2framesize  (struct roar_audio_info * info) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     121ssize_t roar_info2bitspersec (struct roar_audio_info * info) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
    120122 
    121 int     roar_profile2info    (struct roar_audio_info * info, const char * profile); 
    122 ssize_t roar_profiles_list   (const char ** list, size_t len, size_t offset); 
     123int     roar_profile2info    (struct roar_audio_info * info, const char * profile) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
     124ssize_t roar_profiles_list   (const char ** list, size_t len, size_t offset) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 
    123125 
    124126#endif 
Note: See TracChangeset for help on using the changeset viewer.