Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void Q3NetworkProtocol::registerNetworkProtocol ( const QString protocol,
Q3NetworkProtocolFactoryBase *  protocolFactory 
) [static]

Static method to register a network protocol for Qt. For example, if you have an implementation of NNTP (called Nntp) which is derived from Q3NetworkProtocol, call:

    Q3NetworkProtocol::registerNetworkProtocol( "nntp", new Q3NetworkProtocolFactory<Nntp> );
after which your implementation is registered for future nntp operations.

The name of the protocol is given in protocol and a pointer to the protocol factory is given in protocolFactory.

Definition at line 544 of file q3networkprotocol.cpp.

Referenced by getNetworkProtocol(), and Q3UrlOperator::q3InitNetworkProtocols().

{
    if ( !q3networkProtocolRegister ) {
      q3networkProtocolRegister = new Q3NetworkProtocolDict;
      Q3NetworkProtocol::registerNetworkProtocol( "file", new Q3NetworkProtocolFactory< Q3LocalFs > );
    }

    q3networkProtocolRegister->insert( protocol, protocolFactory );
}


Generated by  Doxygen 1.6.0   Back to index