BOOL firstActivation;
DEFINE_EVENT_END(Activated)
+ DEFINE_EVENT_BEGIN(ConnectionStateChange)
+ int state;
+ BOOL active;
+ DEFINE_EVENT_END(ConnectionStateChange)
+
DEFINE_EVENT_BEGIN(Terminate)
int code;
DEFINE_EVENT_END(Terminate)
case CONNECTION_STATE_ACTIVE:
rdp->state = CONNECTION_STATE_ACTIVE;
+ {
+ ActivatedEventArgs activatedEvent;
+ rdpContext* context = rdp->context;
+ EventArgsInit(&activatedEvent, "libfreerdp");
+ activatedEvent.firstActivation = !rdp->deactivation_reactivation;
+ PubSub_OnActivated(context->pubSub, context, &activatedEvent);
+ }
+
break;
default:
break;
}
+ {
+ ConnectionStateChangeEventArgs stateEvent;
+ rdpContext* context = rdp->context;
+ EventArgsInit(&stateEvent, "libfreerdp");
+ stateEvent.state = rdp->state;
+ stateEvent.active = rdp->state == CONNECTION_STATE_ACTIVE;
+ PubSub_OnConnectionStateChange(context->pubSub, context, &stateEvent);
+ }
+
return status;
}
if ((status >= 0) && (rdp->finalize_sc_pdus == FINALIZE_SC_COMPLETE))
{
- ActivatedEventArgs activatedEvent;
- rdpContext* context = rdp->context;
rdp_client_transition_to_state(rdp, CONNECTION_STATE_ACTIVE);
- EventArgsInit(&activatedEvent, "libfreerdp");
- activatedEvent.firstActivation = !rdp->deactivation_reactivation;
- PubSub_OnActivated(context->pubSub, context, &activatedEvent);
return 2;
}