예제 #1
0
autostring::autostring( const gwchar_t *in, void*(*getter)(size_t) ) {
//std::wcerr << "in constructor\n";
    getmem = getter;
    freemem = V_Free;
    basicInit( len( in ) + 1 );
    setNoMod( in );
}
예제 #2
0
ThumbnailsPanel::ThumbnailsPanel(ComicBook* attachedCB, NavigationManager *attachedNM, QWidget* parent) : CBScrollArea(parent)
{
    basicInit();
    setAttachedCB(attachedCB);
    setAttachedNM(attachedNM);
    //Construction de l'affichage des mignatures
    refreshPanel(false);
}
/**
 * Initializes this as a dynamic client
 */
bool DynamicClientInitializer::initializeClient()
{
    if ( !basicInit() )
    {
        LOG_ERR ( "Basic initialization failed" );
        return false;
    }

    LOG ( "Basic initialization done" );

    // Second: Creating an UDP socket, to send the NMS_INIT broadcast
    if ( !setupUdpSocket() )
    {
        return false;
    }

    // Send the NMS_INIT message, and wait for an acceptable response, or the occurrence of a timeout

    LOG ( "Sending UDP" );
    if ( !sendUdpMessage() )
    {
        if ( getLastErrorCode() != ErrorCodes::TIMEOUT )
        {
            LOG ( "Cannot send UDP message" );
            setLastErrorCode ( 888 );
        }
        else if ( getLastErrorCode() == ErrorCodes::TIMEOUT )
        {
            LOG ( "Timeout ..." );
        }
        return false;
    }

    if ( daemonFirstResponse == COMMAND_NOINIT ) // NOINIT ... unknown reasons
    {
        LOG ( "Not a valid response from daemon" );
        return false;
    }

    if ( !analyzeResponse ( daemonFirstResponse.c_str() ) )
    {
        LOG ( "Could not analyze the daemons response" );
        return false;
    }

    return true;
}
예제 #4
0
autostring::autostring( const char *in, void*(*getter)(size_t) ) {
    getmem = getter;
    freemem = V_Free;
    basicInit( len( in ) + 1 );
    setNoMod( in );
}
예제 #5
0
autostring::autostring( void*(*getter)(size_t) ) {
    getmem = getter;
    freemem = V_Free;
    basicInit(0);
    zero();
}
예제 #6
0
autostring::autostring( const gwchar_t *in ) {
    getmem = V_Malloc;
    freemem = V_Free;
    basicInit( len( in ) + 1 );
    setNoMod( in );
}
예제 #7
0
// auto constructor
autostring::autostring( void ) {
    getmem = V_Malloc;
    freemem = V_Free;
    basicInit(0);
    zero();
}
예제 #8
0
void autostring::init( const char *in ) {
    getmem = V_Malloc;
    freemem = V_Free;
    basicInit( len( in ) + 1 );
    setNoMod( in );
}
예제 #9
0
ThumbnailsPanel::ThumbnailsPanel(QWidget* parent) : CBScrollArea(parent)
{
    basicInit();
    m_attachedCB = 0;
}