當前位置: 首頁>>代碼示例>>C++>>正文


C++ CASE_RETURN_STRING函數代碼示例

本文整理匯總了C++中CASE_RETURN_STRING函數的典型用法代碼示例。如果您正苦於以下問題:C++ CASE_RETURN_STRING函數的具體用法?C++ CASE_RETURN_STRING怎麽用?C++ CASE_RETURN_STRING使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CASE_RETURN_STRING函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: macTraceGetInfoLogString

tANI_U8* macTraceGetInfoLogString( tANI_U16 infoLog )
{
    switch( infoLog )
    {
        CASE_RETURN_STRING(eLOG_NODROP_MISSED_BEACON_SCENARIO);
        CASE_RETURN_STRING(eLOG_PROC_DEAUTH_FRAME_SCENARIO);
        default:
            return( (tANI_U8*)"UNKNOWN" );
            break;
    }
}
開發者ID:AmperificSuperKANG,項目名稱:android_kernel_mako,代碼行數:11,代碼來源:macTrace.c

示例2: switch

static const char *system_config_to_string(uint8_t idx)
{
    switch (idx) {
        CASE_RETURN_STRING(CDS_THROUGHPUT);
        CASE_RETURN_STRING(CDS_POWERSAVE);
        CASE_RETURN_STRING(CDS_LATENCY);
    default:
        return "Unknown";
    }

}
開發者ID:S5-APQ8084,項目名稱:qcacld-3.0,代碼行數:11,代碼來源:wlan_hdd_conc_ut.c

示例3: edge_event_to_str

static inline const char*
edge_event_to_str(enum scroll_event event)
{
	switch (event) {
	CASE_RETURN_STRING(SCROLL_EVENT_TOUCH);
	CASE_RETURN_STRING(SCROLL_EVENT_MOTION);
	CASE_RETURN_STRING(SCROLL_EVENT_RELEASE);
	CASE_RETURN_STRING(SCROLL_EVENT_TIMEOUT);
	CASE_RETURN_STRING(SCROLL_EVENT_POSTED);
	}
	return NULL;
}
開發者ID:jigpu,項目名稱:libinput,代碼行數:12,代碼來源:evdev-mt-touchpad-edge-scroll.c

示例4: edge_state_to_str

static inline const char*
edge_state_to_str(enum tp_edge_scroll_touch_state state)
{

	switch (state) {
	CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_NONE);
	CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_EDGE_NEW);
	CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_EDGE);
	CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_AREA);
	}
	return NULL;
}
開發者ID:jigpu,項目名稱:libinput,代碼行數:12,代碼來源:evdev-mt-touchpad-edge-scroll.c

示例5: tap_event_to_str

static inline const char*
tap_event_to_str(enum tap_event event) {
	argcheck_int_range(event, TAP_EVENT_TOUCH, TAP_EVENT_TIMEOUT);

	switch(event) {
		CASE_RETURN_STRING(TAP_EVENT_TOUCH);
		CASE_RETURN_STRING(TAP_EVENT_MOTION);
		CASE_RETURN_STRING(TAP_EVENT_RELEASE);
		CASE_RETURN_STRING(TAP_EVENT_TIMEOUT);
		CASE_RETURN_STRING(TAP_EVENT_BUTTON);
	}
	return NULL;
}
開發者ID:whot,項目名稱:libtouchpad,代碼行數:13,代碼來源:touchpad-tap.c

示例6: macTraceGetcsrRoamState

/* ---------------------------------------------------------------------------
    \fn macTraceGetcsrRoamState
    \function to get string equivalent of a value
	 from the enum eCsrRoamState.

    \param csrRoamState - the value from the enum
    \return the string equivalent of csrRoamState
  ---------------------------------------------------------------------------*/
tANI_U8* macTraceGetcsrRoamState(tANI_U16 csrRoamState)
{
    switch(csrRoamState)
    {
        CASE_RETURN_STRING(eCSR_ROAMING_STATE_STOP);
        CASE_RETURN_STRING(eCSR_ROAMING_STATE_IDLE);
        CASE_RETURN_STRING(eCSR_ROAMING_STATE_SCANNING);
        CASE_RETURN_STRING(eCSR_ROAMING_STATE_JOINING);
        CASE_RETURN_STRING(eCSR_ROAMING_STATE_JOINED);

        default:
            return( (tANI_U8*)"UNKNOWN" );
            break;
    }
}
開發者ID:AmperificSuperKANG,項目名稱:android_kernel_mako,代碼行數:23,代碼來源:macTrace.c

示例7: macTraceGetTLState

/* ---------------------------------------------------------------------------
    \fn macTraceGetTLState
    \function to get string equivalent of a value
	 from the enum WLANTL_STAStateType.

    \param tlState - the value from the enum
    \return the string equivalent of tlState
  ---------------------------------------------------------------------------*/
tANI_U8* macTraceGetTLState(tANI_U16 tlState)
{
   switch(tlState)
    {
        CASE_RETURN_STRING(WLANTL_STA_INIT);
        CASE_RETURN_STRING(WLANTL_STA_CONNECTED);
        CASE_RETURN_STRING(WLANTL_STA_AUTHENTICATED);
        CASE_RETURN_STRING(WLANTL_STA_DISCONNECTED);
        CASE_RETURN_STRING(WLANTL_STA_MAX_STATE);

        default:
            return( (tANI_U8*)"UNKNOWN" );
            break;
   }
}
開發者ID:AmperificSuperKANG,項目名稱:android_kernel_mako,代碼行數:23,代碼來源:macTrace.c

示例8: button_event_to_str

static inline const char*
button_event_to_str(enum button_event event) {
	switch(event) {
	CASE_RETURN_STRING(BUTTON_EVENT_IN_BOTTOM_R);
	CASE_RETURN_STRING(BUTTON_EVENT_IN_BOTTOM_L);
	CASE_RETURN_STRING(BUTTON_EVENT_IN_TOP_R);
	CASE_RETURN_STRING(BUTTON_EVENT_IN_TOP_M);
	CASE_RETURN_STRING(BUTTON_EVENT_IN_TOP_L);
	CASE_RETURN_STRING(BUTTON_EVENT_IN_AREA);
	CASE_RETURN_STRING(BUTTON_EVENT_UP);
	CASE_RETURN_STRING(BUTTON_EVENT_PRESS);
	CASE_RETURN_STRING(BUTTON_EVENT_RELEASE);
	CASE_RETURN_STRING(BUTTON_EVENT_TIMEOUT);
	}
	return NULL;
}
開發者ID:Core2idiot,項目名稱:libinput-for-clickpads,代碼行數:16,代碼來源:evdev-mt-touchpad-buttons.c

示例9: hidpp20_feature_get_name

const char*
hidpp20_feature_get_name(uint16_t feature)
{
	static char numeric[8];
	const char *str;
#define CASE_RETURN_STRING(a) case a: return #a; break

	switch(feature)
	{
	CASE_RETURN_STRING(HIDPP_PAGE_ROOT);
	CASE_RETURN_STRING(HIDPP_PAGE_FEATURE_SET);
	CASE_RETURN_STRING(HIDPP_PAGE_MOUSE_POINTER_BASIC);
	CASE_RETURN_STRING(HIDPP_PAGE_ADJUSTABLE_DPI);
	CASE_RETURN_STRING(HIDPP_PAGE_SPECIAL_KEYS_BUTTONS);
	CASE_RETURN_STRING(HIDPP_PAGE_BATTERY_LEVEL_STATUS);
	CASE_RETURN_STRING(HIDPP_PAGE_KBD_REPROGRAMMABLE_KEYS);
	default:
		sprintf(numeric, "%#4x", feature);
		str = numeric;
		break;
	}

#undef CASE_RETURN_STRING
	return str;
}
開發者ID:phomes,項目名稱:libratbag,代碼行數:25,代碼來源:hidpp20.c

示例10: middlebutton_state_to_str

static inline const char*
middlebutton_state_to_str(enum evdev_middlebutton_state state)
{
	switch (state) {
	CASE_RETURN_STRING(MIDDLEBUTTON_IDLE);
	CASE_RETURN_STRING(MIDDLEBUTTON_LEFT_DOWN);
	CASE_RETURN_STRING(MIDDLEBUTTON_RIGHT_DOWN);
	CASE_RETURN_STRING(MIDDLEBUTTON_MIDDLE);
	CASE_RETURN_STRING(MIDDLEBUTTON_LEFT_UP_PENDING);
	CASE_RETURN_STRING(MIDDLEBUTTON_RIGHT_UP_PENDING);
	CASE_RETURN_STRING(MIDDLEBUTTON_PASSTHROUGH);
	CASE_RETURN_STRING(MIDDLEBUTTON_IGNORE_LR);
	CASE_RETURN_STRING(MIDDLEBUTTON_IGNORE_L);
	CASE_RETURN_STRING(MIDDLEBUTTON_IGNORE_R);
	}

	return NULL;
}
開發者ID:Core2idiot,項目名稱:libinput-for-clickpads,代碼行數:18,代碼來源:evdev-middle-button.c

示例11: macTraceGetNeighbourRoamState

/* ---------------------------------------------------------------------------
    \fn macTraceGetNeighbourRoamState
    \function to get string equivalent of a value
	 from the enum eCsrNeighborRoamState.

    \param neighbourRoamState - the value from the enum
    \return the string equivalent of neighbourRoamState
  ---------------------------------------------------------------------------*/
tANI_U8* macTraceGetNeighbourRoamState(tANI_U16 neighbourRoamState)
{
    switch(neighbourRoamState)
    {
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CLOSED);
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_INIT);
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED);
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN);
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING);
        #ifdef WLAN_FEATURE_VOWIFI_11R
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY);
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN);
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING);
        CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE);
        #endif /* WLAN_FEATURE_VOWIFI_11R */
        CASE_RETURN_STRING(eNEIGHBOR_STATE_MAX);

        default:
            return( (tANI_U8*)"UNKNOWN" );
            break;
    }
}
開發者ID:AmperificSuperKANG,項目名稱:android_kernel_mako,代碼行數:30,代碼來源:macTrace.c

示例12: macTraceGetP2PConnState

tANI_U8* macTraceGetP2PConnState(tANI_U16 connState)
{
    switch(connState)
    {
        CASE_RETURN_STRING(P2P_NOT_ACTIVE);
        CASE_RETURN_STRING(P2P_GO_NEG_PROCESS);
        CASE_RETURN_STRING(P2P_GO_NEG_COMPLETED);
        CASE_RETURN_STRING(P2P_CLIENT_CONNECTING_STATE_1);
        CASE_RETURN_STRING(P2P_GO_COMPLETED_STATE);
        CASE_RETURN_STRING(P2P_CLIENT_CONNECTED_STATE_1);
        CASE_RETURN_STRING(P2P_CLIENT_DISCONNECTED_STATE);
        CASE_RETURN_STRING(P2P_CLIENT_CONNECTING_STATE_2);
        CASE_RETURN_STRING(P2P_CLIENT_COMPLETED_STATE);

        default:
            return( (tANI_U8*)"UNKNOWN" );
            break;
    }
}
開發者ID:AmperificSuperKANG,項目名稱:android_kernel_mako,代碼行數:19,代碼來源:macTrace.c

示例13: button_state_to_str

static inline const char*
button_state_to_str(enum button_state state) {
	switch(state) {
	CASE_RETURN_STRING(BUTTON_STATE_NONE);
	CASE_RETURN_STRING(BUTTON_STATE_AREA);
	CASE_RETURN_STRING(BUTTON_STATE_BOTTOM);
	CASE_RETURN_STRING(BUTTON_STATE_TOP);
	CASE_RETURN_STRING(BUTTON_STATE_TOP_NEW);
	CASE_RETURN_STRING(BUTTON_STATE_TOP_TO_IGNORE);
	CASE_RETURN_STRING(BUTTON_STATE_IGNORE);
	}
	return NULL;
}
開發者ID:Core2idiot,項目名稱:libinput-for-clickpads,代碼行數:13,代碼來源:evdev-mt-touchpad-buttons.c

示例14: macTraceGetCfgMsgString

tANI_U8* macTraceGetCfgMsgString( tANI_U16 cfgMsg )
{
    switch( cfgMsg )
    {
        CASE_RETURN_STRING(WNI_CFG_PARAM_UPDATE_IND);
        CASE_RETURN_STRING(WNI_CFG_DNLD_REQ);
        CASE_RETURN_STRING(WNI_CFG_DNLD_CNF);
        CASE_RETURN_STRING(WNI_CFG_GET_RSP);
        CASE_RETURN_STRING(WNI_CFG_SET_CNF);
        CASE_RETURN_STRING(SIR_CFG_PARAM_UPDATE_IND);
        CASE_RETURN_STRING(SIR_CFG_DOWNLOAD_COMPLETE_IND);

        CASE_RETURN_STRING(WNI_CFG_SET_REQ_NO_RSP);
        default:
            return( (tANI_U8*)"UNKNOWN" );
            break;
    }
}
開發者ID:AmperificSuperKANG,項目名稱:android_kernel_mako,代碼行數:18,代碼來源:macTrace.c

示例15: button_event_to_str

static inline const char*
button_event_to_str(enum button_event event) {
	argcheck_int_range(event, BUTTON_EVENT_IN_R, BUTTON_EVENT_TIMEOUT);

	switch(event) {
		CASE_RETURN_STRING(BUTTON_EVENT_IN_R);
		CASE_RETURN_STRING(BUTTON_EVENT_IN_L);
		CASE_RETURN_STRING(BUTTON_EVENT_IN_AREA);
		CASE_RETURN_STRING(BUTTON_EVENT_UP);
		CASE_RETURN_STRING(BUTTON_EVENT_PRESS);
		CASE_RETURN_STRING(BUTTON_EVENT_RELEASE);
		CASE_RETURN_STRING(BUTTON_EVENT_TIMEOUT);
	}
	return NULL;
}
開發者ID:whot,項目名稱:libtouchpad,代碼行數:15,代碼來源:touchpad-button.c


注:本文中的CASE_RETURN_STRING函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。