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

C++ NotifyUser函数代码示例

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

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



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

示例1: assert

bool XferObject::RegisterInterfaces()
{
    const InterfaceDescription* serviceIntf = ajConnection->busAttachment->GetInterface(XFER_SERVICE_INTERFACE_NAME);
    assert(serviceIntf);
    AddInterface(*serviceIntf);
    /** Register the method handlers with the object */
    MethodEntry methodEntries[6];
    methodEntries[0].member = serviceIntf->GetMember("query");
    methodEntries[0].handler = (MessageReceiver::MethodHandler)(&XferObject::Query);
    methodEntries[1].member = serviceIntf->GetMember("initiate");
    methodEntries[1].handler = (MessageReceiver::MethodHandler)(&XferObject::InitiateXferIn);
    methodEntries[2].member = serviceIntf->GetMember("receive");
    methodEntries[2].handler = (MessageReceiver::MethodHandler)(&XferObject::ReceiveSegment);
    methodEntries[3].member = serviceIntf->GetMember("status");
    methodEntries[3].handler = (MessageReceiver::MethodHandler)(&XferObject::TransferStatus);
    methodEntries[4].member = serviceIntf->GetMember("close");
    methodEntries[4].handler = (MessageReceiver::MethodHandler)(&XferObject::EndXfer);
    methodEntries[5].member = serviceIntf->GetMember("error");
    methodEntries[5].handler = (MessageReceiver::MethodHandler)(&XferObject::ErrorCode);
    status = AddMethodHandlers(methodEntries, sizeof(methodEntries) / sizeof(methodEntries[0]));
    if (ER_OK != status) {
        NotifyUser(MSG_ERROR, "Failed to register method handlers for XferObject");
        return false;
    }
    NotifyUser(MSG_SYSTEM, "register method handlers for XferObject");
    return true;
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:27,代码来源:AllJoynConnection.cpp


示例2: NotifyUser

bool AllJoynBusListener::AcceptSessionJoiner(SessionPort sessionPort, const char* joiner, const SessionOpts& opts)
{
    if (sessionPort != PHOTOCHAT_PORT) {
        NotifyUser(MSG_ERROR, "Rejecting join attempt on non-chat session port %d\n", sessionPort);
        return false;
    }
    NotifyUser(MSG_STATUS, "Accepting join session request from %s (opts.proximity=%x, opts.traffic=%x, opts.transports=%x)\n",
               joiner, opts.proximity, opts.traffic, opts.transports);
    return true;
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:10,代码来源:AllJoynConnection.cpp


示例3: Check_ThreadFunc

void __cdecl Check_ThreadFunc(void *lpParam)
{
	InternetSetCookieA("https://mail.google.com/mail/", "GX", "");
	if (lpParam) {
		CheckMailInbox((Account *)lpParam);
		NotifyUser((Account *)lpParam);
	}
	else {
		for (int i = 0; i < acc_num && GetContactProto(acc[i].hContact); i++) {
			CheckMailInbox(&acc[i]);
			NotifyUser(&acc[i]);
		}
	}
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:14,代码来源:check.cpp


示例4: strlen

//----------------------------------------------------------------------------------------
// AllJoynBusListener (BusListener, SessionPortListener, SessionListener )
//----------------------------------------------------------------------------------------
void AllJoynBusListener::FoundAdvertisedName(const char* name, TransportMask transport, const char* namePrefix)
{
    if (!connection->joinName.empty() && 0 == connection->sessionId) {
        const char* convName = name + strlen(NAME_PREFIX);
        SessionOpts opts(SessionOpts::TRAFFIC_MESSAGES, true, SessionOpts::PROXIMITY_ANY, TRANSPORT_ANY);
        QStatus status = connection->busAttachment->JoinSession(name, PHOTOCHAT_PORT, this, connection->sessionId, opts);
        if (ER_OK == status) {
            NotifyUser(MSG_STATUS, "Joined conversation \"%s\"\n", convName);
        } else {
            NotifyUser(MSG_ERROR, "JoinSession failed (status=%s)\n", QCC_StatusText(status));
        }
    }
    connection->joinComplete = true;
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:17,代码来源:AllJoynConnection.cpp


示例5: MessageBox

bool AllJoynConnection::invariants()
{
    if (NULL == ManagedOutput) {
        MessageBox(NULL, L"Managed Output not set", L"Alljoyn", MB_OK);
        return false;
    }
    if (NULL == JoinNotifier) {
        NotifyUser(MSG_ERROR, "Join Notifier not set");
        return false;
    }
    if (advertisedName.empty() && joinName.empty()) {
        NotifyUser(MSG_ERROR, "Neither advertised or joinName set");
        return false;
    }
    return true;
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:16,代码来源:AllJoynConnection.cpp


示例6: NotifyUser

bool ChatConnection::invariants()
{
    if (NULL == JoinNotifier) {
        NotifyUser(MSG_ERROR, "Join Notifier not set");
        return false;
    }
    if (NULL == ManagedOutput) {
        NotifyUser(MSG_ERROR, "Managed Output  not set");
        return false;
    }
    if (advertisedName.empty() && joinName.empty()) {
        NotifyUser(MSG_ERROR, "Neither advertised or joinName set");
        return false;
    }
    return true;
}
开发者ID:avernon,项目名称:asl_distribution,代码行数:16,代码来源:ChatClasses.cpp


示例7: Plugin_SetState

void duGifCtrl::OnMouseLUp(POINT pt)
{
	if (GetState() == DU_STATE_PRESS)
	{
		Plugin_SetState(this, DU_STATE_NORMAL);
		NotifyUser(DUM_GIFCLICK, NULL, NULL);
	}
}
开发者ID:tantaishan,项目名称:MyEcho,代码行数:8,代码来源:duGifCtrl.cpp


示例8: GetItemIndex

void WINAPI duListBox::OnMouseDbClick(POINT pt)
{
	if (m_pHotItem)
	{
		int nHotItemIndex = GetItemIndex(m_pHotItem);
		NotifyUser(DUM_LBLBUTTONDBCLICK, (WPARAM)nHotItemIndex, NULL);
	}
}
开发者ID:blueantst,项目名称:dulib,代码行数:8,代码来源:duListBox.cpp


示例9: closeFile

void XferObject::EndXfer(const InterfaceDescription::Member* member, Message& msg)
{
    closeFile();
    if (state != -1)
        state = 0;
    saveAsFilename = "";
    NotifyUser(MSG_SYSTEM, "Closed %s", saveAsFilename.c_str());
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:8,代码来源:AllJoynConnection.cpp


示例10: outArg

void XferObject::ErrorCode(const InterfaceDescription::Member* member, Message& msg)
{
    MsgArg outArg("i", errorCode);
    QStatus status = MethodReply(msg, &outArg, 1);
    if (ER_OK != status) {
        NotifyUser(MSG_ERROR, "XferObject::ErrorCode : Error sending reply");
    }
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:8,代码来源:AllJoynConnection.cpp


示例11: chatArg

/** Send a Chat signal */
QStatus ChatObject::SendChatSignal(const char* msg)
{
    MsgArg chatArg("s", msg);
    uint8_t flags = 0;
    if (0 == ajConnection->sessionId) {
        NotifyUser(MSG_ERROR, "Sending Chat signal without a session id\n");
        return ER_ALLJOYN_JOINSESSION_REPLY_NO_SESSION;
    }
    return Signal(NULL, ajConnection->sessionId, *chatSignalMember, &chatArg, 1, 0, flags);
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:11,代码来源:AllJoynConnection.cpp


示例12: CreateFileA

bool XferObject::openFile(const char* filename)
{
    hFile = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
    if (hFile == INVALID_HANDLE_VALUE) {
        DWORD err = GetLastError();
        NotifyUser(MSG_SYSTEM, "XferObjectQuery : Error opening file %s %d %x", filename, err, err);
        return false;
    }
    return true;
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:10,代码来源:AllJoynConnection.cpp


示例13: Wrapup

void
Wrapup( )
{
	struct rusage local_rusage;
	char notification[ BUFSIZ ];

	dprintf(D_FULLDEBUG, "Entering Wrapup()\n" );

	notification[0] = '\0';

	/* This HadErr business isn't well defined. There doesn't seem
		to be a clean way of representing the event of a
		pre-job startup initialization failure.  So, instead of trying
		to propogate the nonexistant JobStatus around to future
		code paths trying to clean up a mess specified by HadErr,
		we are simply going to EXCEPT(). HadErr only gets specified
		when either the std file can't be opened or the shadow
		cannot chdir() to the initialdir(often because of a
		permission/existance problem). */
	if( HadErr ) {
		/* dump the specific error if it has been determined */
		if (ErrBuf[0] != '\0') {
			EXCEPT("%s", ErrBuf);
		} else {
			EXCEPT("Couldn't set up std files or chdir to initialdir--"
				"probably a permissions error.");
		}
	} else {
		/* all event logging has been moved from handle_termination() to
		   log_termination()	--RR */
		handle_termination( Proc, notification, &JobStatus, NULL );
	}

	/* fill in the Proc structure's exit_status with JobStatus, so that when
	 * we call update_job_status the exit status is written into the job queue,
	 * so that the history file will have exit status information for the job.
	 * note that JobStatus is in BSD format, and Proc->exit_status is in POSIX
	 * int format, so we copy very carefully.  on most platforms the 2 formats
	 * are interchangeable, so most of the time we'll get intelligent results.
	 *    -Todd, 11/95
	*/
	memcpy(&(Proc->exit_status[0]),&JobStatus,sizeof((Proc->exit_status[0])));
	get_local_rusage( &local_rusage );
	update_job_status( &local_rusage, &JobRusage );


	/* log the event associated with the termination; pass local and remote
	   rusage for the run.  The total local and remote rusages for the job are
	   stored in the Proc --- these values were updated by update_job_status */
	log_termination (&local_rusage, &JobRusage);

	if( notification[0] ) {
		NotifyUser( notification, Proc );
	}
}
开发者ID:zhangzhehust,项目名称:htcondor,代码行数:55,代码来源:shadow.cpp


示例14: Plugin_Redraw

void WINAPI duListBox::OnMouseLDown(POINT pt)
{
	if (m_pHotItem != m_pSelItem)
	{
		ListBoxItem *pTemp = m_pSelItem;
		m_pSelItem = m_pHotItem;
		Plugin_Redraw(this, TRUE);

		int nOldSelItemIndex = GetItemIndex(pTemp);
		int nNewSelItemIndex = GetItemIndex(m_pHotItem);
		NotifyUser(DUM_LBSELCHANGED, (WPARAM)nOldSelItemIndex, (LPARAM)nNewSelItemIndex);
	}
}
开发者ID:blueantst,项目名称:dulib,代码行数:13,代码来源:duListBox.cpp


示例15: _stprintf

void duSpin::SetValue(int nVal)
{
	m_nVal = nVal;
	TCHAR m_szValue[256];
	_stprintf(m_szValue, _T("%d"), m_nVal);
	SetText(m_szValue);

	m_nSelectionStart = 0;
	m_nSelectionEnd = GetEditTextLength();

	OnEmReplaceSel(FALSE, m_szValue, FALSE, FALSE);
	m_nSelectionStart = m_nSelectionEnd = 0;
	
	NotifyUser(DUM_SPINCHANGE, m_nVal, NULL);
}
开发者ID:tantaishan,项目名称:MyEcho,代码行数:15,代码来源:duSpin.cpp


示例16: xferCallback

void XferObject::InitiateXferIn(const InterfaceDescription::Member* member, Message& msg)
{
    int segmentSize = msg->GetArg(0)->v_uint32;
    int nSegs = msg->GetArg(1)->v_uint32;
    int accept = 0;
    xferCallback("Initiate", accept);
    const char* filename = GetSaveAsFilename();
    commonSegSize = segmentSize;
    if (openFile(filename))
        accept = 1;
    MsgArg outArg("i", accept);
    QStatus status = MethodReply(msg, &outArg, 1);
    if (ER_OK != status) {
        NotifyUser(MSG_ERROR, "XferObjectQuery : Error sending reply");
    }
}
开发者ID:peterdocter,项目名称:Coco2dxDemo,代码行数:16,代码来源:AllJoynConnection.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ NtAllocateVirtualMemory函数代码示例发布时间:2022-05-30
下一篇:
C++ NotifyStatusChanged函数代码示例发布时间: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