15d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
25d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Copyright (C) 2010 NXP Semiconductors
35d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
45d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Licensed under the Apache License, Version 2.0 (the "License");
55d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * you may not use this file except in compliance with the License.
65d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * You may obtain a copy of the License at
75d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
85d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *      http://www.apache.org/licenses/LICENSE-2.0
95d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Unless required by applicable law or agreed to in writing, software
115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * distributed under the License is distributed on an "AS IS" BASIS,
125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * See the License for the specific language governing permissions and
145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * limitations under the License.
155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \file phDalNfc_messageQueueLib.h
195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \brief DAL independant message queue implementation for android (can be used under linux too)
205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Project: Trusted NFC Linux Lignt
225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * $Date: 13 aug 2009
245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * $Author: Jonathan roux
255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * $Revision: 1.0 $
265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef PHDAL4NFC_MESSAGEQUEUE_H
295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHDAL4NFC_MESSAGEQUEUE_H
305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef WIN32
325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef ANDROID
335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <linux/ipc.h>
345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <sys/msg.h>
365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phDal4Nfc_Message_Wrapper
395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly   long mtype;
415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly   phLibNfc_Message_t msg;
425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phDal4Nfc_Message_Wrapper_t;
435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyint phDal4Nfc_msgget(key_t key, int msgflg);
455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyint phDal4Nfc_msgctl(int msqid, int cmd, void *buf);
465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyint phDal4Nfc_msgsnd(int msqid, void * msgp, size_t msgsz, int msgflg);
475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyint phDal4Nfc_msgrcv (int msqid, void * msgp, size_t msgsz, long msgtyp, int msgflg);
485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif /*  PHDAL4NFC_MESSAGEQUEUE_H  */
51