Changeset 4552:47a0412f706d in roaraudio for roarclients
- Timestamp:
- 10/25/10 14:03:43 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r4536 r4552 97 97 " separated list of flags.\n" 98 98 " unflag ID FLAGS - Unsets flags on a stream. See flag.\n" 99 " toogleflag ID FLAGS - Toggels flags on a stream. See flag.\n" 100 " protectflag ID FLAGS - Protects flags on a stream. Those flags can not be\n" 101 " changed anymore after the they got protected. See flag.\n" 99 102 "\n" 100 103 " kick TYPE ID - Kicks object of TYPE with id ID\n" … … 926 929 } 927 930 928 int set_flags (struct roar_connection * con, int id, int reset, char * flags) {929 int f = ROAR_FLAG_NONE;931 int set_flags (struct roar_connection * con, int id, int action, char * flags) { 932 uint32_t f = ROAR_FLAG_NONE; 930 933 char * c; 931 934 struct roar_stream s[1]; … … 976 979 } 977 980 978 return roar_stream_set_flags (con, s, f, reset);981 return roar_stream_set_flags2(con, s, f, action); 979 982 } 980 983 … … 1191 1194 } 1192 1195 i++; 1196 } else if ( !strcmp(k, "toggleflag") ) { 1197 i++; 1198 if ( set_flags(&con, atoi(argv[i]), ROAR_TOGGLE_FLAG, argv[i+1]) == -1 ) { 1199 fprintf(stderr, "Error: can not toggle flags\n"); 1200 } else { 1201 printf("flags changed\n"); 1202 } 1203 i++; 1204 } else if ( !strcmp(k, "protectflag") ) { 1205 i++; 1206 if ( set_flags(&con, atoi(argv[i]), ROAR_NOOP_FLAG|ROAR_PROTECT_FLAG, argv[i+1]) == -1 ) { 1207 fprintf(stderr, "Error: can not protect flags\n"); 1208 } else { 1209 printf("flags protected\n"); 1210 } 1211 i++; 1193 1212 } else if ( !strcmp(k, "metaset") ) { 1194 1213 i++;
Note: See TracChangeset
for help on using the changeset viewer.