summaryrefslogtreecommitdiffstats
path: root/gps/libloc_api_50001/loc_eng_msg_id.h
blob: 0f374cdd41c60160889f5b7e843d1694c42d126e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/* Copyright (c) 2011,2012 The Linux Foundation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials provided
 *       with the distribution.
 *     * Neither the name of The Linux Foundation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
#ifndef LOC_ENG_MSG_ID_H
#define LOC_ENG_MSG_ID_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

struct msgbuf {
    unsigned int msgsz;
    void* msgid;
};

enum loc_eng_msg_ids_t {
    /* 0x 0 - 0xEF is reserved for daemon internal */
    /* 0xF0 - 0x1FF is reserved for daemon & framework communication */
    LOC_ENG_MSG_QUIT = 0x200,

    LOC_ENG_MSG_ENGINE_DOWN,
    LOC_ENG_MSG_ENGINE_UP,

    LOC_ENG_MSG_START_FIX,
    LOC_ENG_MSG_STOP_FIX,
    LOC_ENG_MSG_SET_POSITION_MODE,
    LOC_ENG_MSG_SET_TIME,
    LOC_ENG_MSG_INJECT_XTRA_DATA,
    LOC_ENG_MSG_INJECT_LOCATION,
    LOC_ENG_MSG_DELETE_AIDING_DATA,
    LOC_ENG_MSG_SET_APN,
    LOC_ENG_MSG_SET_SERVER_URL,
    LOC_ENG_MSG_SET_SERVER_IPV4,
    LOC_ENG_MSG_ENABLE_DATA,

    LOC_ENG_MSG_SUPL_VERSION,
    LOC_ENG_MSG_SET_SENSOR_CONTROL_CONFIG,
    LOC_ENG_MSG_SET_SENSOR_PROPERTIES,
    LOC_ENG_MSG_SET_SENSOR_PERF_CONTROL_CONFIG,
    LOC_ENG_MSG_MUTE_SESSION,

    LOC_ENG_MSG_ATL_OPEN_SUCCESS,
    LOC_ENG_MSG_ATL_CLOSED,
    LOC_ENG_MSG_ATL_OPEN_FAILED,

    LOC_ENG_MSG_REPORT_POSITION,
    LOC_ENG_MSG_REPORT_SV,
    LOC_ENG_MSG_REPORT_STATUS,
    LOC_ENG_MSG_REPORT_NMEA,
    LOC_ENG_MSG_REQUEST_BIT,
    LOC_ENG_MSG_RELEASE_BIT,
    LOC_ENG_MSG_REQUEST_ATL,
    LOC_ENG_MSG_RELEASE_ATL,
    LOC_ENG_MSG_REQUEST_WIFI,
    LOC_ENG_MSG_RELEASE_WIFI,
    LOC_ENG_MSG_REQUEST_NI,
    LOC_ENG_MSG_INFORM_NI_RESPONSE,
    LOC_ENG_MSG_REQUEST_XTRA_DATA,
    LOC_ENG_MSG_REQUEST_TIME,
    LOC_ENG_MSG_REQUEST_POSITION,
    LOC_ENG_MSG_EXT_POWER_CONFIG,

    // The following messages are added for ulp
    LOC_ENG_MSG_REQUEST_PHONE_CONTEXT,
    LOC_ENG_MSG_REQUEST_NETWORK_POSIITON,

    /* Following messages are for ulp, start at index 0x600 */

    // Message is sent by GPS HAL layer to add/remove unique request criteria
    ULP_MSG_UPDATE_CRITERIA = 0x600,

    // Message is sent by GPS HAL layer to request ULP to start producing position fixes

    ULP_MSG_START_FIX,

    // Message is sent by Android framework(GpsLocationProvider)
    // to request ULP to stop producing position fixes
    ULP_MSG_STOP_FIX,

    // Message is sent by Android framework(GpsLocationProvider)
    // to inject phone context setting  include initial phone context setting and subsequent changes
    ULP_MSG_INJECT_PHONE_CONTEXT_SETTINGS,

    // Message is sent by network provider to INJECT the position in UlpNetworkPositionReport format
    ULP_MSG_INJECT_NETWORK_POSITION,

    // Message is sent by QUIPC provider in order to report the position in GpsPosition format with QUIPC status
    ULP_MSG_REPORT_QUIPC_POSITION,

    // Message is sent by QUIPC module in order to request some info from ULP
    ULP_MSG_REQUEST_COARSE_POSITION,

    // Message is sent to ULP module to re-evaluate its subsystems
    ULP_MSG_MONITOR,

    // Last ULP MSG
    ULP_MSG_LAST = 0x700,

    /* Message is sent by HAL to LOC API to configure LTE Positioning
       Profile in modem */
    LOC_ENG_MSG_LPP_CONFIG,

    // Message is sent by Android framework (GpsLocationProvider)
    // to inject the raw command
    ULP_MSG_INJECT_RAW_COMMAND,

    LOC_ENG_MSG_PRIVACY,
};

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* LOC_ENG_MSG_ID_H */