view power.cpp @ 503:3d17fdac096a

Makefile improvements from library/application separation. Library object files don't need soap includes, and depend on a different set of header files from the application object files. Run the library tests with "make test"
author mas01cr
date Tue, 13 Jan 2009 21:26:21 +0000
parents 342822c2d49a
children cc2b97d020b1
line wrap: on
line source
#include "audioDB.h"
extern "C" {
#include "audioDB_API.h"
#include "audioDB-internals.h"
}

int audiodb_power(adb_t *adb) {
  if(!(adb->flags & O_RDWR)) {
    return 1;
  }
  if(adb->header->length > 0) {
    return 1;
  }

  adb->header->flags |= O2_FLAG_POWER;
  return audiodb_sync_header(adb);
}