• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LOC_LOGE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LOC_LOGE函数的典型用法代码示例。如果您正苦于以下问题:C++ LOC_LOGE函数的具体用法?C++ LOC_LOGE怎么用?C++ LOC_LOGE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LOC_LOGE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: msg_q_unblock

/*===========================================================================

  FUNCTION:   msg_q_unblock

  ===========================================================================*/
msq_q_err_type msg_q_unblock(void* msg_q_data)
{
   if ( msg_q_data == NULL )
   {
      LOC_LOGE("%s: Invalid msg_q_data parameter!\n", __FUNCTION__);
      return eMSG_Q_INVALID_HANDLE;
   }

   msg_q* p_msg_q = (msg_q*)msg_q_data;
   pthread_mutex_lock(&p_msg_q->list_mutex);

   if( p_msg_q->unblocked )
   {
      LOC_LOGE("%s: Message queue has been unblocked.\n", __FUNCTION__);
      pthread_mutex_unlock(&p_msg_q->list_mutex);
      return eMSG_Q_UNAVAILABLE_RESOURCE;
   }

   LOC_LOGD("%s: Unblocking Message Queue\n", __FUNCTION__);
   /* Unblocking message queue */
   p_msg_q->unblocked = 1;

   /* Allow all the waiters to wake up */
   pthread_cond_broadcast(&p_msg_q->list_cond);

   pthread_mutex_unlock(&p_msg_q->list_mutex);

   LOC_LOGD("%s: Message Queue unblocked\n", __FUNCTION__);

   return eMSG_Q_SUCCESS;
}
开发者ID:AniruddhC,项目名称:c1905-device-tree,代码行数:36,代码来源:msg_q.c


示例2: LOC_LOGD

/**
@brief Register sensor client with SLIM CORE

Function sends message to slim daemon to initiate client
registration with SLIM CORE

@param  z_Txn: Parameters for sensor client registration
*/
int SocketClientWrapper::ClientRegister(slim_OpenTxnStructType &z_Txn)
{
    LOC_LOGD("%s:%d] Received client register", __func__, __LINE__);

    SocketClientOpenReq openRequest;
    memset(&openRequest, 0, sizeof(openRequest));

    openRequest.msgHeader.msgId = eSLIM_SOCKET_CLIENT_MSG_ID_OPEN_REQ;
    openRequest.msgHeader.msgSize = sizeof(SocketClientOpenReq);
    openRequest.msgPayload = z_Txn;

    LOC_LOGD("%s:%d] sizeof(SocketClientOpenReq) is %d, sizeof(openRequest.msgHeader) is %d",
             __func__, __LINE__, sizeof(SocketClientOpenReq), sizeof(openRequest.msgHeader));

    SocketClientWrapper::mCallbackFunction = openRequest.msgPayload.fn_Callback;
    LOC_LOGD("%s:%d] Received client register, p_Handle is %08X", __func__, __LINE__, z_Txn.p_Handle);
    LOC_LOGD("%s:%d] Received fn_Callback is %08X", __func__, __LINE__, openRequest.msgPayload.fn_Callback);
    // If socket_not_present or socket_not_connected, then error/warning
    if ( (SocketClientWrapper::mSocketFd < 0)
        )
    {
        LOC_LOGE("%s[%d]: socket not present/connected\n",
                        __func__, __LINE__);
        return -1;
    }

    if (write(SocketClientWrapper::mSocketFd, &openRequest, sizeof(openRequest)) < 0)
    {
        LOC_LOGE("%s[%d]: error writing on socket\n", __func__, __LINE__);
        return -1;
    }
    return 0;
}
开发者ID:xingrz,项目名称:android_tools_leeco_msm8996,代码行数:41,代码来源:SocketClientWrapper.cpp


示例3: dlopen

LocApiAdapter* LocApiAdapter::getLocApiAdapter(LocEng &locEng)
{
    void* handle;
    LocApiAdapter* adapter = NULL;

    handle = dlopen ("libloc_api_v02.so", RTLD_NOW);

    if (!handle) {
        LOC_LOGE("%s: dlopen(libloc_api_v02.so) failed, trying to load libloc_api-rpc-qc.so", __FUNCTION__);
        LOC_LOGE("%s: %s", __FUNCTION__, dlerror());
        handle = dlopen ("libloc_api-rpc-qc.so", RTLD_NOW);
    }
    else
        LOC_LOGI("%s: dlopen(libloc_api_v02.so) succeeded.", __FUNCTION__);

    if (!handle) {
        LOC_LOGE("%s: dlopen(libloc_api-rpc-qc.so) failed, constructing LocApiAdapter", __FUNCTION__);
        adapter = new LocApiAdapter(locEng);
    } else {
        getLocApiAdapter_t* getHandle = (getLocApiAdapter_t*)dlsym(handle, "_Z16getLocApiAdapterR6LocEng");
        if (!getHandle) {
            LOC_LOGE("%s: dlsym(getLocApiAdapter) failed", __FUNCTION__);
            LOC_LOGE("%s: %s", __FUNCTION__, dlerror());
            return NULL;
        }
        adapter = (*getHandle)(locEng);
    }

    return adapter;
}
开发者ID:Aromer-room,项目名称:philz_touch_cwm6_device_vendor,代码行数:30,代码来源:LocApiAdapter.cpp


示例4: ds_client_stop_call

/**
 * @brief Stops a data call associated with the handle
 *
 * @param[in] client_handle Client handle
 *
 * @return Operation result
 * @retval E_DS_CLIENT_SUCCESS    On success.
 * @retval E_DS_CLIENT_FAILURE... On error.
 */
static ds_client_status_enum_type ds_client_stop_call(dsClientHandleType client_handle)
{
    ds_client_status_enum_type ret = E_DS_CLIENT_SUCCESS;
    ds_client_session_data *p_ds_global_data = (ds_client_session_data *)client_handle;
    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);

    if(client_handle == NULL) {
        LOC_LOGE("%s:%d]: Null argument received. Failing\n", __func__, __LINE__);
        ret = E_DS_CLIENT_FAILURE_GENERAL;
        goto err;
    }

    if(dsi_stop_data_call(p_ds_global_data->dsi_net_handle) == DSI_SUCCESS) {
        LOC_LOGD("%s:%d]: Sent request to stop data call\n", __func__, __LINE__);
    }
    else {
        LOC_LOGE("%s:%d]: Could not send request to stop data call\n",
                 __func__, __LINE__);
        ret = E_DS_CLIENT_FAILURE_GENERAL;
        goto err;
    }

err:
    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
    return ret;
}
开发者ID:silent27121984,项目名称:MK_device_xiaomi_santoni,代码行数:35,代码来源:ds_client.c


示例5: loc_eng_dmn_conn_glue_pipeget

/*===========================================================================
FUNCTION    loc_eng_dmn_conn_glue_pipeget

DESCRIPTION
   create a named pipe.

   pipe_name - pipe name path
   mode - mode

DEPENDENCIES
   None

RETURN VALUE
   0: success or negative value for failure

SIDE EFFECTS
   N/A

===========================================================================*/
int loc_eng_dmn_conn_glue_pipeget(const char * pipe_name, int mode)
{
    int fd;
    int result;

    LOC_LOGD("%s, mode = %d\n", pipe_name, mode);
    result = mkfifo(pipe_name, 0660);

    if ((result == -1) && (errno != EEXIST)) {
        LOC_LOGE("failed: %s\n", strerror(errno));
        return result;
    }

    // The mode in mkfifo is not honoured and does not provide the
    // group permissions. Doing chmod to add group permissions.
    result = chmod (pipe_name, 0660);
    if (result != 0){
        LOC_LOGE ("%s failed to change mode for %s, error = %s\n", __func__,
              pipe_name, strerror(errno));
    }

    fd = open(pipe_name, mode);
    if (fd <= 0)
    {
        LOC_LOGE("failed: %s\n", strerror(errno));
    }
    LOC_LOGD("fd = %d, %s\n", fd, pipe_name);
    return fd;
}
开发者ID:AniruddhC,项目名称:c1905-device-tree,代码行数:48,代码来源:loc_eng_dmn_conn_glue_pipe.c


示例6: get_geofence_interface

const GpsGeofencingInterface* get_geofence_interface(void)
{
    ENTRY_LOG();
    void *handle;
    const char *error;
    typedef const GpsGeofencingInterface* (*get_gps_geofence_interface_function) (void);
    get_gps_geofence_interface_function get_gps_geofence_interface;
    static const GpsGeofencingInterface* geofence_interface = NULL;

    dlerror();    /* Clear any existing error */

    handle = dlopen ("libgeofence.so", RTLD_NOW);

    if (!handle)
    {
        if ((error = dlerror()) != NULL)  {
            LOC_LOGE ("%s, dlopen for libgeofence.so failed, error = %s\n", __func__, error);
           }
        goto exit;
    }
    dlerror();    /* Clear any existing error */
    get_gps_geofence_interface = (get_gps_geofence_interface_function)dlsym(handle, "gps_geofence_get_interface");
    if ((error = dlerror()) != NULL)  {
        LOC_LOGE ("%s, dlsym for ulpInterface failed, error = %s\n", __func__, error);
        goto exit;
     }

    geofence_interface = get_gps_geofence_interface();

exit:
    EXIT_LOG(%d, geofence_interface == NULL);
    return geofence_interface;
}
开发者ID:vl197602,项目名称:device_cm11,代码行数:33,代码来源:loc.cpp


示例7: ds_client_get_profile_list

/*This function obtains the list of supported profiles*/
static ds_client_status_enum_type ds_client_get_profile_list(
    qmi_client_type *ds_client_handle,
    ds_client_resp_union_type *profile_list_resp_msg,
    wds_profile_type_enum_v01 profile_type)
{
    ds_client_status_enum_type ret = E_DS_CLIENT_SUCCESS;
    ds_client_req_union_type req_union;
    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);

    req_union.p_get_profile_list_req = NULL;
    req_union.p_get_profile_list_req = (wds_get_profile_list_req_msg_v01 *)
        calloc(1, sizeof(wds_get_profile_list_req_msg_v01));
    if(req_union.p_get_profile_list_req == NULL) {
        LOC_LOGE("%s:%d]: Could not allocate memory for"
                 "wds_get_profile_list_req_msg_v01\n", __func__, __LINE__);
        goto err;
    }
    //Populate required members of the request structure
    req_union.p_get_profile_list_req->profile_type_valid = 1;
    req_union.p_get_profile_list_req->profile_type = profile_type;
    ret = ds_client_send_qmi_sync_req(ds_client_handle,
                                       QMI_WDS_GET_PROFILE_LIST_REQ_V01,
                                       profile_list_resp_msg, &req_union);
    if(ret != E_DS_CLIENT_SUCCESS) {
        LOC_LOGE("%s:%d]: ds_client_send_qmi_req failed. ret: %d\n",
                 __func__, __LINE__, ret);
        goto err;
    }
err:
    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
    if(req_union.p_get_profile_list_req)
        free(req_union.p_get_profile_list_req);
    return ret;
}
开发者ID:silent27121984,项目名称:MK_device_xiaomi_santoni,代码行数:35,代码来源:ds_client.c


示例8: loc_set_config_entry

/*===========================================================================
FUNCTION loc_set_config_entry

DESCRIPTION
   Potentially sets a given configuration table entry based on the passed in
   configuration value. This is done by using a string comparison of the
   parameter names and those found in the configuration file.

PARAMETERS:
   config_entry: configuration entry in the table to possibly set
   config_value: value to store in the entry if the parameter names match

DEPENDENCIES
   N/A

RETURN VALUE
   None

SIDE EFFECTS
   N/A
===========================================================================*/
void loc_set_config_entry(loc_param_s_type* config_entry, loc_param_v_type* config_value)
{
   if(NULL == config_entry || NULL == config_value)
   {
      LOC_LOGE("%s: INVALID config entry or parameter", __FUNCTION__);
      return;
   }

   if (strcmp(config_entry->param_name, config_value->param_name) == 0 &&
               config_entry->param_ptr)
   {
      switch (config_entry->param_type)
      {
      case 's':
         if (strcmp(config_value->param_str_value, "NULL") == 0)
         {
            *((char*)config_entry->param_ptr) = '\0';
         }
         else {
            strlcpy((char*) config_entry->param_ptr,
                  config_value->param_str_value,
                  LOC_MAX_PARAM_STRING + 1);
         }
         /* Log INI values */
         LOC_LOGD("%s: PARAM %s = %s", __FUNCTION__, config_entry->param_name, (char*)config_entry->param_ptr);

         if(NULL != config_entry->param_set)
         {
            *(config_entry->param_set) = 1;
         }
         break;
      case 'n':
         *((int *)config_entry->param_ptr) = config_value->param_int_value;
         /* Log INI values */
         LOC_LOGD("%s: PARAM %s = %d", __FUNCTION__, config_entry->param_name, config_value->param_int_value);

         if(NULL != config_entry->param_set)
         {
            *(config_entry->param_set) = 1;
         }
         break;
      case 'f':
         *((double *)config_entry->param_ptr) = config_value->param_double_value;
         /* Log INI values */
         LOC_LOGD("%s: PARAM %s = %f", __FUNCTION__, config_entry->param_name, config_value->param_double_value);

         if(NULL != config_entry->param_set)
         {
            *(config_entry->param_set) = 1;
         }
         break;
      default:
         LOC_LOGE("%s: PARAM %s parameter type must be n, f, or s", __FUNCTION__, config_entry->param_name);
      }
   }
}
开发者ID:5idaidai,项目名称:android_device_xiaomi_msm8226-common,代码行数:77,代码来源:loc_cfg.cpp


示例9: loc_api_server_proc_init

static int loc_api_server_proc_init(void *context)
{
    loc_api_server_msgqid = loc_eng_dmn_conn_glue_msgget(global_loc_api_q_path, O_RDWR);
    //change mode/group for the global_loc_api_q_path pipe
    int result = chmod (global_loc_api_q_path, 0660);
    if (result != 0)
    {
        LOC_LOGE("failed to change mode for %s, error = %s\n", global_loc_api_q_path, strerror(errno));
    }

    struct group * gps_group = getgrnam("gps");
    if (gps_group != NULL)
    {
       result = chown (global_loc_api_q_path, -1, gps_group->gr_gid);
       if (result != 0)
       {
          LOC_LOGE("chown for pipe failed, pipe %s, gid = %d, result = %d, error = %s\n",
                   global_loc_api_q_path, gps_group->gr_gid, result, strerror(errno));
       }
    }
    else
    {
       LOC_LOGE("getgrnam for gps failed, error code = %d\n",  errno);
    }

    loc_api_resp_msgqid = loc_eng_dmn_conn_glue_msgget(global_loc_api_resp_q_path, O_RDWR);

    //change mode/group for the global_loc_api_resp_q_path pipe
    result = chmod (global_loc_api_resp_q_path, 0660);
    if (result != 0)
    {
        LOC_LOGE("failed to change mode for %s, error = %s\n", global_loc_api_resp_q_path, strerror(errno));
    }

    if (gps_group != NULL)
    {
       result = chown (global_loc_api_resp_q_path, -1, gps_group->gr_gid);
       if (result != 0)
       {
          LOC_LOGE("chown for pipe failed, pipe %s, gid = %d, result = %d, error = %s\n",
                   global_loc_api_resp_q_path,
                   gps_group->gr_gid, result, strerror(errno));
       }
    }

    quipc_msgqid = loc_eng_dmn_conn_glue_msgget(global_quipc_ctrl_q_path, O_RDWR);
    msapm_msgqid = loc_eng_dmn_conn_glue_msgget(global_msapm_ctrl_q_path , O_RDWR);
    msapu_msgqid = loc_eng_dmn_conn_glue_msgget(global_msapu_ctrl_q_path , O_RDWR);

    LOC_LOGD("%s:%d] loc_api_server_msgqid = %d\n", __func__, __LINE__, loc_api_server_msgqid);
    return 0;
}
开发者ID:AniruddhC,项目名称:c1905-device-tree,代码行数:52,代码来源:loc_eng_dmn_conn.cpp


示例10: loc_api_server_proc

static int loc_api_server_proc(void *context)
{
    int length, sz;
    int result = 0;
    static int cnt = 0;
    struct ctrl_msgbuf * p_cmsgbuf;
    struct ctrl_msgbuf cmsg_resp;

    sz = sizeof(struct ctrl_msgbuf) + 256;
    p_cmsgbuf = (struct ctrl_msgbuf *) malloc(sz);

    if (!p_cmsgbuf) {
        LOC_LOGE("%s:%d] Out of memory\n", __func__, __LINE__);
        return -1;
    }

    cnt ++;
    LOC_LOGD("%s:%d] %d listening on %s...\n", __func__, __LINE__, cnt, (char *) context);
    length = loc_eng_dmn_conn_glue_msgrcv(loc_api_server_msgqid, p_cmsgbuf, sz);
    if (length <= 0) {
        free(p_cmsgbuf);
        LOC_LOGE("%s:%d] fail receiving msg from gpsone_daemon, retry later\n", __func__, __LINE__);
        usleep(1000);
        return 0;
    }

    LOC_LOGD("%s:%d] received ctrl_type = %d\n", __func__, __LINE__, p_cmsgbuf->ctrl_type);
    switch(p_cmsgbuf->ctrl_type) {
        case GPSONE_LOC_API_IF_REQUEST:
            result = loc_eng_dmn_conn_loc_api_server_if_request_handler(p_cmsgbuf, length);
            break;

        case GPSONE_LOC_API_IF_RELEASE:
            result = loc_eng_dmn_conn_loc_api_server_if_release_handler(p_cmsgbuf, length);
            break;

        case GPSONE_UNBLOCK:
            LOC_LOGD("%s:%d] GPSONE_UNBLOCK\n", __func__, __LINE__);
            break;

        default:
            LOC_LOGE("%s:%d] unsupported ctrl_type = %d\n",
                __func__, __LINE__, p_cmsgbuf->ctrl_type);
            break;
    }

    free(p_cmsgbuf);
    return 0;
}
开发者ID:AniruddhC,项目名称:c1905-device-tree,代码行数:49,代码来源:loc_eng_dmn_conn.cpp


示例11: LOC_LOGD

/**
 * @brief Starts a data call using the profile number provided
 *
 * The function uses parameters provided from @a ds_client_open_call_type
 * call result.
 *
 * @param[in] client_handle Client handle
 * @param[in] profile_index Profile index
 * @param[in] pdp_type      PDP type
 *
 * @return Operation result
 * @retval E_DS_CLIENT_SUCCESS    On success.
 * @retval E_DS_CLIENT_FAILURE... On error.
 */
static ds_client_status_enum_type ds_client_start_call
(
  dsClientHandleType client_handle,
  int profile_index,
  int pdp_type
)
{
    ds_client_status_enum_type ret = E_DS_CLIENT_FAILURE_GENERAL;
    dsi_call_param_value_t param_info;
    dsi_hndl_t dsi_handle;
    ds_client_session_data *ds_global_data = (ds_client_session_data *)client_handle;
    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
    if(ds_global_data == NULL) {
        LOC_LOGE("%s:%d]: Null callback parameter\n", __func__, __LINE__);
        goto err;
    }
    dsi_handle = ds_global_data->dsi_net_handle;
    //Set profile index as call parameter
    param_info.buf_val = NULL;
    param_info.num_val = profile_index;
    dsi_set_data_call_param(dsi_handle,
                            DSI_CALL_INFO_UMTS_PROFILE_IDX,
                            &param_info);

    //Set IP Version as call parameter
    param_info.buf_val = NULL;
    param_info.num_val = pdp_type;
    dsi_set_data_call_param(dsi_handle,
                            DSI_CALL_INFO_IP_VERSION,
                            &param_info);
    LOC_LOGD("%s:%d]: Starting emergency call with profile index %d; pdp_type:%d\n",
             __func__, __LINE__, profile_index, pdp_type);
    if(dsi_start_data_call(dsi_handle) == DSI_SUCCESS) {
        LOC_LOGD("%s:%d]: Sent request to start data call\n",
                 __func__, __LINE__);
        ret = E_DS_CLIENT_SUCCESS;
    }
    else {
        LOC_LOGE("%s:%d]: Could not send req to start data call \n", __func__, __LINE__);
        ret = E_DS_CLIENT_FAILURE_GENERAL;
        goto err;
    }

err:
    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
    return ret;

}
开发者ID:silent27121984,项目名称:MK_device_xiaomi_santoni,代码行数:62,代码来源:ds_client.c


示例12: ds_client_get_profile_settings

/*This function obtains settings for the profile specified by
 the profile_identifier*/
static ds_client_status_enum_type ds_client_get_profile_settings(
    qmi_client_type *ds_client_handle,
    ds_client_resp_union_type *profile_settings_resp_msg,
    wds_profile_identifier_type_v01 *profile_identifier)
{
    ds_client_status_enum_type ret = E_DS_CLIENT_SUCCESS;
    ds_client_req_union_type req_union;

    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
    //Since it's a union containing a pointer to a structure,
    //following entities have the same address
    //- req_union
    //- req_union.p_get_profile_settings_req
    //- req_union.p_get_profile_settings_req->profile
    //so we can very well assign req_union = profile_identifier
    req_union.p_get_profile_settings_req =
        (wds_get_profile_settings_req_msg_v01 *)profile_identifier;
    ret = ds_client_send_qmi_sync_req(ds_client_handle,
                                       QMI_WDS_GET_PROFILE_SETTINGS_REQ_V01,
                                       profile_settings_resp_msg, &req_union);
    if(ret != E_DS_CLIENT_SUCCESS) {
        LOC_LOGE("%s:%d]: ds_client_send_qmi_req failed. ret: %d\n",
                 __func__, __LINE__, ret);
        goto err;
    }
err:
    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
    return ret;
}
开发者ID:silent27121984,项目名称:MK_device_xiaomi_santoni,代码行数:31,代码来源:ds_client.c


示例13: loc_eng_inject_xtra_data_in_buffer

/*===========================================================================
FUNCTION    loc_eng_inject_xtra_data_in_buffer

DESCRIPTION
   Injects buffered XTRA file into the engine and clears the buffer.

DEPENDENCIES
   N/A

RETURN VALUE
   0: success
   >0: failure

SIDE EFFECTS
   N/A

===========================================================================*/
int loc_eng_inject_xtra_data_in_buffer()
{
   int rc = 0;
   char *data;
   int length;

   pthread_mutex_lock(&loc_eng_data.xtra_module_data.lock);

   data = loc_eng_data.xtra_module_data.xtra_data_for_injection;
   length = loc_eng_data.xtra_module_data.xtra_data_len;

   loc_eng_data.xtra_module_data.xtra_data_for_injection = NULL;
   loc_eng_data.xtra_module_data.xtra_data_len = 0;

   pthread_mutex_unlock(&loc_eng_data.xtra_module_data.lock);

   if (data)
   {
      if (qct_loc_eng_inject_xtra_data(data, length))
      {
         // FIXME gracefully handle injection error
         LOC_LOGE("XTRA injection failed.");
         rc = -1;
      }

      free(data);
   }

   return rc;
}
开发者ID:InsomniaAOSP,项目名称:android_hardware_qcom_gps,代码行数:47,代码来源:loc_eng_xtra.cpp


示例14: linked_list_flush

/*===========================================================================

  FUNCTION:   linked_list_flush

  ===========================================================================*/
linked_list_err_type linked_list_flush(void* list_data)
{
   if( list_data == NULL )
   {
      LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
      return eLINKED_LIST_INVALID_HANDLE;
   }

   list_state* p_list = (list_state*)list_data;

   /* Remove all dynamically allocated elements */
   while( p_list->p_head != NULL )
   {
      list_element* tmp = p_list->p_head->next;

      /* Free data pointer if told to do so. */
      if( p_list->p_head->dealloc_func != NULL )
      {
         p_list->p_head->dealloc_func(p_list->p_head->data_ptr);
      }

      /* Free list element */
      free(p_list->p_head);

      p_list->p_head = tmp;
   }

   p_list->p_tail = NULL;

   return eLINKED_LIST_SUCCESS;
}
开发者ID:MIPS,项目名称:hardware-qcom-gps,代码行数:36,代码来源:linked_list.c


示例15: ulp_msg_forward_quipc_coarse_position_request

/*===========================================================================
FUNCTION    ulp_msg_forward_quipc_coarse_position_request

DESCRIPTION
   This function is called when libulp module need to forward coarse
   position request from ULP named pipe to message queue. This is done
   so that all ULP state transition is done in one thread.

DEPENDENCIES
   None

RETURN VALUE
   0: success
   -1: failure

SIDE EFFECTS
   N/A

===========================================================================*/
int ulp_msg_forward_quipc_coarse_position_request ()
{
   int ret_val = -1;

   ENTRY_LOG_CALLFLOW();
   do
   {
      // Forward the coarse position request in ULP named pipe to ULP message queue
      // so that all state transition is done in one thread
      ulp_msg *msg(new ulp_msg(&ulp_data, ULP_MSG_REQUEST_COARSE_POSITION));
      if (msg == NULL)
      {
         LOC_LOGE ("%s, failed to create message: ULP_MSG_REQUEST_COARSE_POSITION \n", __func__);
         break;
      }

      msg_q_snd(ulp_data.loc_proxy->mQ, msg, ulp_msg_free);

     ret_val = 0;

   } while (0);

   EXIT_LOG(%d, ret_val);
   return ret_val;
}
开发者ID:xingrz,项目名称:android_tools_leeco_msm8996,代码行数:44,代码来源:ulp_msg.cpp


示例16: ulp_msg_send_monitor_request

/*===========================================================================
FUNCTION    ulp_msg_send_monitor_request

DESCRIPTION
   This function is called when ulp monitor thread need to send a message
   to ULP main thread to request ULP to re-evaluate its subsystems.

DEPENDENCIES
   None

RETURN VALUE
   0: success
   -1: failure

SIDE EFFECTS
   N/A

===========================================================================*/
int ulp_msg_send_monitor_request ()
{
   int ret_val = -1;

   ENTRY_LOG_CALLFLOW();
   do
   {
      //Pass the start messgage to ULP if present & activated
      ulp_msg *ulpMonitorMsg(new ulp_msg(&ulp_data, ULP_MSG_MONITOR));

      if (ulpMonitorMsg == NULL)
      {
         LOC_LOGE ("%s, failed to create message: ULP_MSG_MONITOR \n", __func__);
         break;
      }

      msg_q_snd(ulp_data.loc_proxy->mQ,
                ulpMonitorMsg,
                ulp_msg_free);

     ret_val = 0;

   } while (0);

   EXIT_LOG(%d, ret_val);
   return ret_val;
}
开发者ID:xingrz,项目名称:android_tools_leeco_msm8996,代码行数:45,代码来源:ulp_msg.cpp


示例17: LOC_LOGD

void GnssAPIClient::onStopTrackingCb(LocationError error)
{
    LOC_LOGD("%s]: (%d)", __FUNCTION__, error);
    if (error == LOCATION_ERROR_SUCCESS && mGnssCbIface != nullptr) {
        auto r = mGnssCbIface->gnssStatusCb(IGnssCallback::GnssStatusValue::SESSION_END);
        if (!r.isOk()) {
            LOC_LOGE("%s] Error from gnssStatusCb SESSION_END description=%s",
                __func__, r.description().c_str());
        }
        r = mGnssCbIface->gnssStatusCb(IGnssCallback::GnssStatusValue::ENGINE_OFF);
        if (!r.isOk()) {
            LOC_LOGE("%s] Error from gnssStatusCb ENGINE_OFF description=%s",
                __func__, r.description().c_str());
        }
    }
}
开发者ID:MIPS,项目名称:hardware-qcom-gps,代码行数:16,代码来源:GnssAPIClient.cpp


示例18: loc_get_extension

/*===========================================================================
FUNCTION    loc_get_extension

DESCRIPTION
   Get the gps extension to support XTRA.

DEPENDENCIES
   N/A

RETURN VALUE
   The GPS extension interface.

SIDE EFFECTS
   N/A

===========================================================================*/
static const void* loc_get_extension(const char* name)
{
    ENTRY_LOG();
    const void* ret_val = NULL;

   if (strcmp(name, GPS_XTRA_INTERFACE) == 0)
   {
      ret_val = &sLocEngXTRAInterface;
   }

   else if (strcmp(name, AGPS_INTERFACE) == 0)
   {
      ret_val = &sLocEngAGpsInterface;
   }

   else if (strcmp(name, GPS_NI_INTERFACE) == 0)
   {
      ret_val = &sLocEngNiInterface;
   }

   else if (strcmp(name, AGPS_RIL_INTERFACE) == 0)
   {
       char baseband[PROPERTY_VALUE_MAX];
       property_get("ro.baseband", baseband, "msm");
       if (strcmp(baseband, "csfb") == 0)
       {
           ret_val = &sLocEngAGpsRilInterface;
       }
   }
   else if (strcmp(name, ULP_RAW_CMD_INTERFACE) == 0)
   {
      ret_val = &sLocEngInjectRawCmdInterface;
   }
   else if(strcmp(name, ULP_PHONE_CONTEXT_INTERFACE) == 0)
   {
     ret_val = &sLocEngUlpPhoneContextInterface;
   }
   else if(strcmp(name, ULP_NETWORK_INTERFACE) == 0)
   {
     //Return a valid value for ULP Network Interface only if ULP
     //turned on in gps.conf
     if(gps_conf.CAPABILITIES & ULP_CAPABILITY)
         ret_val = &sUlpNetworkInterface;
   }
   else if (strcmp(name, GPS_GEOFENCING_INTERFACE) == 0)
   {
        if ((gps_conf.CAPABILITIES | GPS_CAPABILITY_GEOFENCING)
                == gps_conf.CAPABILITIES)
        {
            ret_val = get_geofence_interface();
        }
   }
   else
   {
      LOC_LOGE ("get_extension: Invalid interface passed in\n");
   }
    EXIT_LOG(%p, ret_val);
    return ret_val;
}
开发者ID:vl197602,项目名称:device_cm11,代码行数:75,代码来源:loc.cpp


示例19: ulp_msg_forward_quipc_position_report

/*===========================================================================
FUNCTION    ulp_msg_forward_quipc_position_report

DESCRIPTION
   This function is called when libulp module need to forward a position report
   from ULP named pipe to message queue. This is done so that all ULP
   state transition is done in one thread.

DEPENDENCIES
   None

RETURN VALUE
   0: success
   -1: failure

SIDE EFFECTS
   N/A

===========================================================================*/
int ulp_msg_forward_quipc_position_report (int                    error_code,
                                           const UlpLocation*     quipc_location_ptr,
                                           int                    debug_info_length,
                                           char*                  debug_info_ptr)
{
   int ret_val = -1;
   UlpLocation quipc_location;
   char* debug_info = NULL;

   ENTRY_LOG_CALLFLOW();
   do
   {
      if (quipc_location_ptr == NULL)
      {
         break;
      }

      quipc_location = *quipc_location_ptr;

      LOC_LOGI ("%s, Debug Info = %s, Length = %d\n", __func__, debug_info_ptr, debug_info_length);

      // Make a copy of the debug info received. Needs to be freed by ulp_brain.
      if (debug_info_length != 0) {
        debug_info = new char[debug_info_length];
        if (debug_info != NULL)
        {
          strlcpy((char*)debug_info, debug_info_ptr, debug_info_length);
          quipc_location.rawData = (void*) debug_info;
          quipc_location.rawDataSize = debug_info_length;
        }
      }

      ulp_msg_report_quipc_position *ulpPositionMsg(
            new ulp_msg_report_quipc_position(&ulp_data,
                                              quipc_location,
                                              error_code));
      if (ulpPositionMsg == NULL)
      {
         LOC_LOGE ("%s, failed to create message: ulp_msg_report_quipc_position \n", __func__);

         // Free the allocated memory
         delete [] debug_info;
         debug_info = NULL;
         quipc_location.rawData = NULL;
         quipc_location.rawDataSize = 0;
         break;
      }

     msg_q_snd(ulp_data.loc_proxy->mQ,
               ulpPositionMsg,
               ulp_msg_free);

     ret_val = 0;

   } while (0);

   EXIT_LOG(%d, ret_val);
   return ret_val;
}
开发者ID:xingrz,项目名称:android_tools_leeco_msm8996,代码行数:78,代码来源:ulp_msg.cpp


示例20: ulp_zpp_start_engine

/*===========================================================================
FUNCTION    ulp_zpp_start_engine

DESCRIPTION
   This function is called to start ZPP provider.

DEPENDENCIES
   None

RETURN VALUE
   0: success
   -1: failure

SIDE EFFECTS
   N/A
===========================================================================*/
int ulp_zpp_start_engine ()
{
   int                   ret_val = -1;
   LocAdapterBase*       adapter = ulp_data.loc_proxy->getAdapter();

   ENTRY_LOG_CALLFLOW();

   LOC_LOGD ("%s, zpp state = %d, ulp_zpp_engine_running () = %d\n",
             __func__,
             ulp_data.zpp_provider_info.state,
             ulp_zpp_engine_running());
   do
   {
      // Wait for first fix to complete
      if (ulp_data.zpp_provider_info.first_fix_pending == true)
      {
         break;
      }

      if (ulp_zpp_engine_running () == false)
      {
         if ((ULP_LOC_SCREEN_ON == ulp_data.system_event)||
             (ULP_LOC_TIMEZONE_CHANGE == ulp_data.system_event)||
             (ULP_LOC_PHONE_CONTEXT_UPDATE == ulp_data.system_event))
         {
            //these events require single shot ZPP updates
            ulp_data.zpp_provider_info.recurrence_type =
                ULP_LOC_RECURRENCE_SINGLE;
         }

         else if ( ULP_LOC_POWER_CONNECTED == ulp_data.system_event)
         {
            ulp_data.zpp_provider_info.recurrence_type =
                ULP_LOC_RECURRENCE_PERIODIC;

            pthread_mutex_lock(&zpp_provider_info_p->tLock);
            ulp_data.zpp_provider_info.periodic_session_active = true;
            pthread_mutex_unlock(&zpp_provider_info_p->tLock);
            if (NULL == ulp_data.zpp_provider_info.thread)
            {
               //Launch a thread to do a periodic ZPP update
               int rc = 0;
               rc = pthread_create(&ulp_data.zpp_provider_info.thread,
                                   NULL, ulp_zpp_thread_proc, &ulp_data);
               if (rc) LOC_LOGE("ZPP thread could not created. rc = %d\n", rc);
            }
         }
         // Send ZPP location request to engine
         adapter->getZppInt();
         ulp_data.zpp_provider_info.state              = ZPP_STATE_ACTIVE;
         ulp_data.zpp_provider_info.first_fix_pending  = true;
         ret_val = 0;
      }
   } while (0);

   EXIT_LOG(%d, ret_val);

   return ret_val;
}
开发者ID:xingrz,项目名称:android_tools_leeco_msm8996,代码行数:75,代码来源:ulp_zpp.cpp



注:本文中的LOC_LOGE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LODWORD函数代码示例发布时间:2022-05-30
下一篇:
C++ LOC_LOGD函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap