Lines Matching refs:ssource
70 QIOChannelFDSource *ssource = (QIOChannelFDSource *)source; in qio_channel_fd_source_check() local
72 return ssource->fd.revents & ssource->condition; in qio_channel_fd_source_check()
82 QIOChannelFDSource *ssource = (QIOChannelFDSource *)source; in qio_channel_fd_source_dispatch() local
84 return (*func)(ssource->ioc, in qio_channel_fd_source_dispatch()
85 ssource->fd.revents & ssource->condition, in qio_channel_fd_source_dispatch()
93 QIOChannelFDSource *ssource = (QIOChannelFDSource *)source; in qio_channel_fd_source_finalize() local
95 object_unref(OBJECT(ssource->ioc)); in qio_channel_fd_source_finalize()
118 QIOChannelSocketSource *ssource = (QIOChannelSocketSource *)source; in qio_channel_socket_source_check() local
121 if (!ssource->condition) { in qio_channel_socket_source_check()
128 if (ssource->condition & G_IO_IN) { in qio_channel_socket_source_check()
129 FD_SET(ssource->socket, &rfds); in qio_channel_socket_source_check()
131 if (ssource->condition & G_IO_OUT) { in qio_channel_socket_source_check()
132 FD_SET(ssource->socket, &wfds); in qio_channel_socket_source_check()
134 if (ssource->condition & G_IO_PRI) { in qio_channel_socket_source_check()
135 FD_SET(ssource->socket, &xfds); in qio_channel_socket_source_check()
137 ssource->revents = 0; in qio_channel_socket_source_check()
142 if (FD_ISSET(ssource->socket, &rfds)) { in qio_channel_socket_source_check()
143 ssource->revents |= G_IO_IN; in qio_channel_socket_source_check()
145 if (FD_ISSET(ssource->socket, &wfds)) { in qio_channel_socket_source_check()
146 ssource->revents |= G_IO_OUT; in qio_channel_socket_source_check()
148 if (FD_ISSET(ssource->socket, &xfds)) { in qio_channel_socket_source_check()
149 ssource->revents |= G_IO_PRI; in qio_channel_socket_source_check()
152 return ssource->revents; in qio_channel_socket_source_check()
162 QIOChannelSocketSource *ssource = (QIOChannelSocketSource *)source; in qio_channel_socket_source_dispatch() local
164 return (*func)(ssource->ioc, ssource->revents, user_data); in qio_channel_socket_source_dispatch()
171 QIOChannelSocketSource *ssource = (QIOChannelSocketSource *)source; in qio_channel_socket_source_finalize() local
173 object_unref(OBJECT(ssource->ioc)); in qio_channel_socket_source_finalize()
199 QIOChannelFDPairSource *ssource = (QIOChannelFDPairSource *)source; in qio_channel_fd_pair_source_check() local
200 GIOCondition poll_condition = ssource->fdread.revents | in qio_channel_fd_pair_source_check()
201 ssource->fdwrite.revents; in qio_channel_fd_pair_source_check()
203 return poll_condition & ssource->condition; in qio_channel_fd_pair_source_check()
213 QIOChannelFDPairSource *ssource = (QIOChannelFDPairSource *)source; in qio_channel_fd_pair_source_dispatch() local
214 GIOCondition poll_condition = ssource->fdread.revents | in qio_channel_fd_pair_source_dispatch()
215 ssource->fdwrite.revents; in qio_channel_fd_pair_source_dispatch()
217 return (*func)(ssource->ioc, in qio_channel_fd_pair_source_dispatch()
218 poll_condition & ssource->condition, in qio_channel_fd_pair_source_dispatch()
226 QIOChannelFDPairSource *ssource = (QIOChannelFDPairSource *)source; in qio_channel_fd_pair_source_finalize() local
228 object_unref(OBJECT(ssource->ioc)); in qio_channel_fd_pair_source_finalize()
253 QIOChannelFDSource *ssource; in qio_channel_create_fd_watch() local
257 ssource = (QIOChannelFDSource *)source; in qio_channel_create_fd_watch()
259 ssource->ioc = ioc; in qio_channel_create_fd_watch()
262 ssource->condition = condition; in qio_channel_create_fd_watch()
265 ssource->fd.fd = (gint64)_get_osfhandle(fd); in qio_channel_create_fd_watch()
267 ssource->fd.fd = fd; in qio_channel_create_fd_watch()
269 ssource->fd.events = condition; in qio_channel_create_fd_watch()
271 g_source_add_poll(source, &ssource->fd); in qio_channel_create_fd_watch()
282 QIOChannelSocketSource *ssource; in qio_channel_create_socket_watch() local
290 ssource = (QIOChannelSocketSource *)source; in qio_channel_create_socket_watch()
292 ssource->ioc = ioc; in qio_channel_create_socket_watch()
295 ssource->condition = condition; in qio_channel_create_socket_watch()
296 ssource->socket = _get_osfhandle(sockfd); in qio_channel_create_socket_watch()
297 ssource->revents = 0; in qio_channel_create_socket_watch()
299 ssource->fd.fd = (gintptr)ioc->event; in qio_channel_create_socket_watch()
300 ssource->fd.events = G_IO_IN; in qio_channel_create_socket_watch()
302 g_source_add_poll(source, &ssource->fd); in qio_channel_create_socket_watch()
321 QIOChannelFDPairSource *ssource; in qio_channel_create_fd_pair_watch() local
325 ssource = (QIOChannelFDPairSource *)source; in qio_channel_create_fd_pair_watch()
327 ssource->ioc = ioc; in qio_channel_create_fd_pair_watch()
330 ssource->condition = condition; in qio_channel_create_fd_pair_watch()
333 ssource->fdread.fd = (gint64)_get_osfhandle(fdread); in qio_channel_create_fd_pair_watch()
334 ssource->fdwrite.fd = (gint64)_get_osfhandle(fdwrite); in qio_channel_create_fd_pair_watch()
336 ssource->fdread.fd = fdread; in qio_channel_create_fd_pair_watch()
337 ssource->fdwrite.fd = fdwrite; in qio_channel_create_fd_pair_watch()
340 ssource->fdread.events = condition & G_IO_IN; in qio_channel_create_fd_pair_watch()
341 ssource->fdwrite.events = condition & G_IO_OUT; in qio_channel_create_fd_pair_watch()
343 g_source_add_poll(source, &ssource->fdread); in qio_channel_create_fd_pair_watch()
344 g_source_add_poll(source, &ssource->fdwrite); in qio_channel_create_fd_pair_watch()