~ubuntu-branches/debian/squeeze/libffado/squeeze

« back to all changes in this revision

Viewing changes to src/libcontrol/ClockSelect.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Knoth
  • Date: 2009-03-12 17:36:53 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090312173653-bldzd1ft6dz1jwsf
Tags: 2.0~rc1+svn1539-1
* Initial Debian inclusion, based on Ubuntu (Closes: #501502)
* Bumped standards version
* Limit architecture to i386, amd64 and powerpc
* Add external sources to copyright file
* Make the source package depend on debhelper-7
* Remove Ubuntu's u from libname (libffado.so.0.0.0u)
* Provide generic man pages (redirecting the user to www.ffado.org for now)
* Fix lintian warnings about outdated FSF address and unversioned GPL
  reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
 
260
260
}
261
261
 
 
262
// --- stream status feedback selection ---
 
263
 
 
264
StreamingStatus::StreamingStatus(FFADODevice &d)
 
265
: Enum(&d)
 
266
, m_Device( d )
 
267
{
 
268
    setName("StreamingStatus");
 
269
    setLabel("Streaming Status");
 
270
    setDescription("Obtain information of the current streaming status of a device");
 
271
}
 
272
 
 
273
bool
 
274
StreamingStatus::select(int idx)
 
275
{
 
276
    debugWarning("Cannot change stream status through control interface\n");
 
277
    return false;
 
278
}
 
279
 
 
280
int
 
281
StreamingStatus::selected()
 
282
{
 
283
    return m_Device.getStreamingState();
 
284
}
 
285
 
 
286
int
 
287
StreamingStatus::count()
 
288
{
 
289
    // NOTE: this should correspond to the number of enums in FFADODevice::eStreamingState
 
290
    return 4;
 
291
}
 
292
 
 
293
std::string
 
294
StreamingStatus::getEnumLabel(int idx)
 
295
{
 
296
    switch(idx) {
 
297
        case FFADODevice::eSS_Idle:
 
298
            return "Idle";
 
299
        case FFADODevice::eSS_Sending:
 
300
            return "Sending";
 
301
        case FFADODevice::eSS_Receiving:
 
302
            return "Receiving";
 
303
        case FFADODevice::eSS_Both:
 
304
            return "Both";
 
305
        default:
 
306
            debugError("Invalid enum index specified: %d\n", idx);
 
307
            return "Invalid enum index";
 
308
    }
 
309
}
 
310
 
 
311
bool
 
312
StreamingStatus::canChangeValue()
 
313
{
 
314
    return false;
 
315
}
 
316
 
 
317
void
 
318
StreamingStatus::show()
 
319
{
 
320
    debugOutput( DEBUG_LEVEL_NORMAL, "StreamingStatus Element %s, current: %d\n",
 
321
        getName().c_str(), m_Device.getStreamingState());
 
322
}
 
323
 
262
324
 
263
325
} // namespace Control