Example #1
0
static int virNetSASLContextOnceInit(void)
{
    if (!(virNetSASLContextClass = virClassNew("virNetSASLContext",
                                               sizeof(virNetSASLContext),
                                               virNetSASLContextDispose)))
        return -1;

    if (!(virNetSASLSessionClass = virClassNew("virNetSASLSession",
                                               sizeof(virNetSASLSession),
                                               virNetSASLSessionDispose)))
        return -1;

    return 0;
}
Example #2
0
static void
virAdmGlobalInit(void)
{
    /* It would be nice if we could trace the use of this call, to
     * help diagnose in log files if a user calls something other than
     * virAdmConnectOpen first.  But we can't rely on VIR_DEBUG working
     * until after initialization is complete, and since this is
     * one-shot, we never get here again.  */
    if (virThreadInitialize() < 0 ||
        virErrorInitialize() < 0)
        goto error;

    virLogSetFromEnv();

    if (!bindtextdomain(PACKAGE, LOCALEDIR))
        goto error;

    if (!(remoteAdminPrivClass = virClassNew(virClassForObjectLockable(),
                                             "remoteAdminPriv",
                                             sizeof(remoteAdminPriv),
                                             remoteAdminPrivDispose)))
        goto error;

    return;
 error:
    virAdmGlobalError = true;
}
Example #3
0
static int virNetSASLContextOnceInit(void)
{
    if (!(virNetSASLContextClass = virClassNew(virClassForObjectLockable(),
                                               "virNetSASLContext",
                                               sizeof(virNetSASLContext),
                                               NULL)))
        return -1;

    if (!(virNetSASLSessionClass = virClassNew(virClassForObjectLockable(),
                                               "virNetSASLSession",
                                               sizeof(virNetSASLSession),
                                               virNetSASLSessionDispose)))
        return -1;

    return 0;
}
Example #4
0
static int
virStoragePoolObjOnceInit(void)
{
    if (!(virStoragePoolObjClass = virClassNew(virClassForObjectLockable(),
                                               "virStoragePoolObj",
                                               sizeof(virStoragePoolObj),
                                               virStoragePoolObjDispose)))
        return -1;

    if (!(virStoragePoolObjListClass = virClassNew(virClassForObjectRWLockable(),
                                                   "virStoragePoolObjList",
                                                   sizeof(virStoragePoolObjList),
                                                   virStoragePoolObjListDispose)))
        return -1;

    return 0;
}
Example #5
0
static int virDomainCapsOnceInit(void)
{
    if (!(virDomainCapsClass = virClassNew(virClassForObjectLockable(),
                                           "virDomainCapsClass",
                                           sizeof(virDomainCaps),
                                           virDomainCapsDispose)))
        return -1;

    virDomainCapsCPUModelsClass = virClassNew(virClassForObject(),
                                              "virDomainCapsCPUModelsClass",
                                              sizeof(virDomainCapsCPUModels),
                                              virDomainCapsCPUModelsDispose);
    if (!virDomainCapsCPUModelsClass)
        return -1;

    return 0;
}
Example #6
0
static int
virNodeDeviceEventsOnceInit(void)
{
    if (!(virNodeDeviceEventClass =
          virClassNew(virClassForObjectEvent(),
                      "virNodeDeviceEvent",
                      sizeof(virNodeDeviceEvent),
                      virNodeDeviceEventDispose)))
        return -1;
    if (!(virNodeDeviceEventLifecycleClass =
          virClassNew(virNodeDeviceEventClass,
                      "virNodeDeviceEventLifecycle",
                      sizeof(virNodeDeviceEventLifecycle),
                      virNodeDeviceEventLifecycleDispose)))
        return -1;
    return 0;
}
Example #7
0
static int virNetServerOnceInit(void)
{
    if (!(virNetServerClass = virClassNew("virNetServer",
                                          sizeof(virNetServer),
                                          virNetServerDispose)))
        return -1;

    return 0;
}
Example #8
0
static int virNetServerProgramOnceInit(void)
{
    if (!(virNetServerProgramClass = virClassNew("virNetServerProgram",
                                                 sizeof(virNetServerProgram),
                                                 virNetServerProgramDispose)))
        return -1;

    return 0;
}
static int virNetServerServiceOnceInit(void)
{
    if (!(virNetServerServiceClass = virClassNew("virNetServerService",
                                                 sizeof(virNetServerService),
                                                 virNetServerServiceDispose)))
        return -1;

    return 0;
}
Example #10
0
static int virNetSocketOnceInit(void)
{
    if (!(virNetSocketClass = virClassNew("virNetSocket",
                                          sizeof(virNetSocket),
                                          virNetSocketDispose)))
        return -1;

    return 0;
}
Example #11
0
static int qemuAgentOnceInit(void)
{
    if (!(qemuAgentClass = virClassNew("qemuAgent",
                                       sizeof(qemuAgent),
                                       qemuAgentDispose)))
        return -1;

    return 0;
}
Example #12
0
static int virNetServerClientOnceInit(void)
{
    if (!(virNetServerClientClass = virClassNew("virNetServerClient",
                                                sizeof(virNetServerClient),
                                                virNetServerClientDispose)))
        return -1;

    return 0;
}
Example #13
0
static int qemuAgentOnceInit(void)
{
    if (!(qemuAgentClass = virClassNew(virClassForObjectLockable(),
                                       "qemuAgent",
                                       sizeof(qemuAgent),
                                       qemuAgentDispose)))
        return -1;

    return 0;
}
static int
virNetcfDriverStateOnceInit(void)
{
    if (!(virNetcfDriverStateClass = virClassNew(virClassForObjectLockable(),
                                       "virNetcfDriverState",
                                       sizeof(virNetcfDriverState),
                                       virNetcfDriverStateDispose)))
        return -1;
    return 0;
}
Example #15
0
static int dnsmasqCapsOnceInit(void)
{
    if (!(dnsmasqCapsClass = virClassNew("dnsmasqCaps",
                                         sizeof(dnsmasqCaps),
                                         dnsmasqCapsDispose))) {
        return -1;
    }

    return 0;
}
Example #16
0
static int libxlConfigOnceInit(void)
{
    if (!(libxlDriverConfigClass = virClassNew(virClassForObject(),
                                               "libxlDriverConfig",
                                               sizeof(libxlDriverConfig),
                                               libxlDriverConfigDispose)))
        return -1;

    return 0;
}
Example #17
0
static int virNetworkEventsOnceInit(void)
{
    if (!(virNetworkEventLifecycleClass = virClassNew(
                                             virClassForObjectEvent(),
                                             "virNetworkEventLifecycle",
                                             sizeof(virNetworkEventLifecycle),
                                             virNetworkEventLifecycleDispose)))
        return -1;
    return 0;
}
Example #18
0
static int virSecurityManagerOnceInit(void)
{
    if (!(virSecurityManagerClass = virClassNew(virClassForObjectLockable(),
                                                "virSecurityManagerClass",
                                                sizeof(virSecurityManager),
                                                virSecurityManagerDispose)))
        return -1;

    return 0;
}
Example #19
0
static int virPortAllocatorOnceInit(void)
{
    if (!(virPortAllocatorClass = virClassNew(virClassForObjectLockable(),
                                              "virPortAllocator",
                                              sizeof(virPortAllocator),
                                              virPortAllocatorDispose)))
        return -1;

    return 0;
}
Example #20
0
static int virNetServerOnceInit(void)
{
    if (!(virNetServerClass = virClassNew(virClassForObjectLockable(),
                                          "virNetServer",
                                          sizeof(virNetServer),
                                          virNetServerDispose)))
        return -1;

    return 0;
}
Example #21
0
static int virDomainObjListOnceInit(void)
{
    if (!(virDomainObjListClass = virClassNew(virClassForObjectLockable(),
                                              "virDomainObjList",
                                              sizeof(virDomainObjList),
                                              virDomainObjListDispose)))
        return -1;

    return 0;
}
Example #22
0
static int
virObjectEventOnceInit(void)
{
    if (!(virObjectEventStateClass =
          virClassNew(virClassForObjectLockable(),
                      "virObjectEventState",
                      sizeof(virObjectEventState),
                      virObjectEventStateDispose)))
        return -1;

    if (!(virObjectEventClass =
          virClassNew(virClassForObject(),
                      "virObjectEvent",
                      sizeof(virObjectEvent),
                      virObjectEventDispose)))
        return -1;

    return 0;
}
Example #23
0
static int virLXCConfigOnceInit(void)
{
    if (!(virLXCDriverConfigClass = virClassNew(virClassForObject(),
                                                 "virLXCDriverConfig",
                                                 sizeof(virLXCDriverConfig),
                                                 virLXCDriverConfigDispose)))
        return -1;

    return 0;
}
Example #24
0
static int virKeepAliveOnceInit(void)
{
    if (!(virKeepAliveClass = virClassNew(virClassForObjectLockable(),
                                          "virKeepAlive",
                                          sizeof(virKeepAlive),
                                          virKeepAliveDispose)))
        return -1;

    return 0;
}
Example #25
0
static int virCapabilitiesOnceInit(void)
{
    if (!(virCapsClass = virClassNew(virClassForObject(),
                                     "virCaps",
                                     sizeof(virCaps),
                                     virCapabilitiesDispose)))
        return -1;

    return 0;
}
Example #26
0
static int virNetClientStreamOnceInit(void)
{
    if (!(virNetClientStreamClass = virClassNew(virClassForObjectLockable(),
                                                "virNetClientStream",
                                                sizeof(virNetClientStream),
                                                virNetClientStreamDispose)))
        return -1;

    return 0;
}
Example #27
0
static int virNetSocketOnceInit(void)
{
    if (!(virNetSocketClass = virClassNew(virClassForObjectLockable(),
                                          "virNetSocket",
                                          sizeof(virNetSocket),
                                          virNetSocketDispose)))
        return -1;

    return 0;
}
Example #28
0
static int
libxlDomainObjPrivateOnceInit(void)
{
    if (!(libxlDomainObjPrivateClass = virClassNew(virClassForObjectLockable(),
                                                   "libxlDomainObjPrivate",
                                                   sizeof(libxlDomainObjPrivate),
                                                   libxlDomainObjPrivateDispose)))
        return -1;

    return 0;
}
Example #29
0
static int virHashAtomicOnceInit(void)
{
    virHashAtomicClass = virClassNew(virClassForObjectLockable(),
                                     "virHashAtomic",
                                     sizeof(virHashAtomic),
                                     virHashAtomicDispose);
    if (!virHashAtomicClass)
        return -1;
    else
        return 0;
}
Example #30
0
static int
libxlMigrationDstArgsOnceInit(void)
{
    if (!(libxlMigrationDstArgsClass = virClassNew(virClassForObject(),
                                                   "libxlMigrationDstArgs",
                                                   sizeof(libxlMigrationDstArgs),
                                                   libxlMigrationDstArgsDispose)))
        return -1;

    return 0;
}