File: service.cpp

package info (click to toggle)
gpsd 3.27-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,056 kB
  • sloc: ansic: 74,438; python: 16,521; sh: 890; cpp: 848; php: 225; makefile: 197; perl: 111; javascript: 26; xml: 11
file content (25 lines) | stat: -rw-r--r-- 721 bytes parent folder | download | duplicates (4)
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
#define LOG_TAG "android.hardware.gnss@1.1-service.gpsd"

#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
#include "Gnss.h"

using ::android::hardware::configureRpcThreadpool;
using ::android::hardware::gnss::V1_1::implementation::Gnss;
using ::android::hardware::gnss::V1_1::IGnss;
using ::android::hardware::joinRpcThreadpool;
using ::android::OK;
using ::android::sp;

int main(int /* argc */, char* /* argv */ []) {
    sp<IGnss> gnss = new Gnss();
    configureRpcThreadpool(1, true /* will join */);
    if (gnss->registerAsService() != OK) {
        ALOGE("Could not register gnss 1.1 service.");
        return 1;
    }
    joinRpcThreadpool();

    ALOGE("Service exited!");
    return 1;
}