|
Packit |
ce73f7 |
/*
|
|
Packit |
ce73f7 |
* Copyright (c) 2011 Collabora Ltd
|
|
Packit |
ce73f7 |
*
|
|
Packit |
ce73f7 |
* Redistribution and use in source and binary forms, with or without
|
|
Packit |
ce73f7 |
* modification, are permitted provided that the following conditions
|
|
Packit |
ce73f7 |
* are met:
|
|
Packit |
ce73f7 |
*
|
|
Packit |
ce73f7 |
* * Redistributions of source code must retain the above
|
|
Packit |
ce73f7 |
* copyright notice, this list of conditions and the
|
|
Packit |
ce73f7 |
* following disclaimer.
|
|
Packit |
ce73f7 |
* * Redistributions in binary form must reproduce the
|
|
Packit |
ce73f7 |
* above copyright notice, this list of conditions and
|
|
Packit |
ce73f7 |
* the following disclaimer in the documentation and/or
|
|
Packit |
ce73f7 |
* other materials provided with the distribution.
|
|
Packit |
ce73f7 |
* * The names of contributors to this software may not be
|
|
Packit |
ce73f7 |
* used to endorse or promote products derived from this
|
|
Packit |
ce73f7 |
* software without specific prior written permission.
|
|
Packit |
ce73f7 |
*
|
|
Packit |
ce73f7 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
Packit |
ce73f7 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
Packit |
ce73f7 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
Packit |
ce73f7 |
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
Packit |
ce73f7 |
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
Packit |
ce73f7 |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
Packit |
ce73f7 |
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
Packit |
ce73f7 |
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
Packit |
ce73f7 |
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit |
ce73f7 |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
Packit |
ce73f7 |
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
|
Packit |
ce73f7 |
* DAMAGE.
|
|
Packit |
ce73f7 |
*
|
|
Packit |
ce73f7 |
*
|
|
Packit |
ce73f7 |
* CONTRIBUTORS
|
|
Packit |
ce73f7 |
* Stef Walter <stef@memberwebs.com>
|
|
Packit |
ce73f7 |
*/
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
#ifndef P11_MESSAGE_H_
|
|
Packit |
ce73f7 |
#define P11_MESSAGE_H_
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
#include "compat.h"
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
#include <sys/types.h>
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
#define P11_MESSAGE_MAX 512
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
extern char * (* p11_message_storage) (void);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
void p11_message (const char* msg,
|
|
Packit |
ce73f7 |
...) GNUC_PRINTF (1, 2);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
void p11_message_err (int errnum,
|
|
Packit |
ce73f7 |
const char* msg,
|
|
Packit |
ce73f7 |
...) GNUC_PRINTF (2, 3);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
void p11_message_store (const char* msg,
|
|
Packit |
ce73f7 |
size_t length);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
const char * p11_message_last (void);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
void p11_message_clear (void);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
void p11_message_quiet (void);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
void p11_message_loud (void);
|
|
Packit |
ce73f7 |
|
|
Packit |
ce73f7 |
#endif /* P11_MESSAGE_H_ */
|