Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Classes  ·  Annotées  ·  Hiérarchie  ·  Fonctions  ·  Structure  · 

QCopChannel Class Reference


This class provides communication capabilities between several clients. More...

#include <qcopchannel_qws.h>

Inherits QObject.

List of all member functions.

Public Members

  • QCopChannel ( const QCString & channel, QObject * parent=0, const char * name=0 ) 
  • virtual ~QCopChannel () 
  • QCString channel () const
  • virtual void receive ( const QCString & msg, const QByteArray & data ) 

Signals

  • void received ( const QCString & msg, const QByteArray & data ) 

Static Public Members

  • bool isRegistered ( const QCString & channel ) 
  • bool send ( const QCString & channel, const QCString & msg ) 
  • bool send ( const QCString & channel, const QCString & msg, const QByteArray & data ) 
  • void sendLocally ( const QCString & ch, const QCString & msg, const QByteArray & data ) (internal)

Detailed Description

This class provides communication capabilities between several clients.

The Qt Cop (QCOP) is a COmmunication Protocol, allowing clients to communicate inside of the same address space or between different processes.

Currently, this facility is only available on Qt/Embedded as on X11 and Windows we are exploring the use of existing standard such as DCOP and COM.

QCopChannel contains important functions like send() and isRegistered() which are static and therefore usable without an object.

In order to listen to the traffic on the channel, you should either subclass from QCopChannel and provide an re-implementation for receive(), or you should connect() to the received() signal.


Member Function Documentation

QCopChannel::QCopChannel ( const QCString & channel, QObject * parent=0, const char * name=0 )

Constructs a QCop channel and registers it with the server under the name channel. The standard parent and name arguments are passed on to the QObject constructor.

QCopChannel::~QCopChannel () [virtual]

Destructs the client's side end of the channel and notifies the server about the closing. The server itself keeps the channel open until the last registered client detaches.

QCString QCopChannel::channel () const

Returns the name of the channel.

bool QCopChannel::isRegistered ( const QCString & channel ) [static]

Queries the server for the existance of channel.

Returns TRUE if channel is registered.

void QCopChannel::receive ( const QCString & msg, const QByteArray & data ) [virtual]

This virtual function allows subclasses of QCopChannel to process data received from their channel.

The default implementation emits the received() signal.

Note that the format of data has to be well defined in order to demarshall the contained information.

See also send().

void QCopChannel::received ( const QCString & msg, const QByteArray & data ) [signal]

This signal is emitted whenever the receive() function gets incoming data.

bool QCopChannel::send ( const QCString & channel, const QCString & msg ) [static]

Send the message msg on channel. The message will be distributed to all clients subscribed to the channel.

See also receive().

bool QCopChannel::send ( const QCString & channel, const QCString & msg, const QByteArray & data ) [static]

Same as above function except the additional data parameter. QDataStream provides a convenient way to fill the byte array with auxiliary data.

void QCopChannel::sendLocally ( const QCString & ch, const QCString & msg, const QByteArray & data ) [static]

For internal use only.


Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2005 Trolltech, all rights reserved.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 80
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le Qt Developer Network au hasard

Logo

Combiner licence, à propos et fermer d'une dernière manière

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 2.3
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web