]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/moh_msg.h
configd-84.1.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / moh_msg.h
1 /*
2 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25
26 #ifndef _MOH_MSG_H
27 #define _MOH_MSG_H
28
29 #include <sys/types.h>
30
31 /* local socket path */
32 #define MOH_PATH "/tmp/.modemOnHold"
33 #define CURRENT_VERSION 1
34
35 /* MOH message paquets */
36 struct moh_msg_hdr {
37 uint32_t m_type; // type of the message
38 uint32_t m_result; // error code of notification message
39 uint32_t m_cookie; // user param
40 uint32_t m_link; // link for this message
41 uint32_t m_len; // len of the following data
42 };
43
44 struct moh_msg {
45 uint32_t m_type; // type of the message
46 uint32_t m_result; // error code of notification message
47 uint32_t m_cookie; // user param, or error num for event
48 uint32_t m_link; // link for this message
49 uint32_t m_len; // len of the following data
50 u_char m_data[1]; // msg data sent or received
51 };
52
53 /* codes for MOH messages */
54 enum {
55 /* API client commands */
56 MOH_VERSION = 1,
57 MOH_DEVICE_SUPPORTS_HOLD,
58 MOH_SESSION_SUPPORTS_HOLD,
59 MOH_PUT_SESSION_ON_HOLD,
60 MOH_RESUME_SESSION_ON_HOLD,
61 MOH_SESSION_IS_ON_HOLD,
62 MOH_SESSION_GET_STATUS
63 };
64
65 #endif /* _MOH_MSG_H */
66