Added __BEGIN_DECLS and __END_DECLS around function declarations.