4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
26 #include "email-stub-queue.h"
27 #include "email-ipc-build.h"
29 #include "email-debug-log.h"
31 static emipc_email_queue_item *head = NULL;
32 static emipc_email_queue_item *tail = NULL;
35 EXPORT_API void *emipc_pop_in_queue()
40 emipc_email_queue_item *popped = head;
50 count = (count <= 0) ? 0 : count-1;
57 EXPORT_API bool emipc_push_in_queue(void *data)
59 emipc_email_queue_item *item = NULL;
61 EM_DEBUG_EXCEPTION("[IPCLib] emipc_push_in_queue - invalid input\n");
65 item = (emipc_email_queue_item *)malloc(sizeof(emipc_email_queue_item));
67 EM_DEBUG_EXCEPTION("Malloc failed.");
70 memset(item, 0x00, sizeof(emipc_email_queue_item));
86 EXPORT_API int emipc_get_count_of_item()