diff options
author | Jan Synacek <jsynacek@redhat.com> | 2013-02-13 15:26:15 +0100 |
---|---|---|
committer | Jan Synacek <jsynacek@redhat.com> | 2013-02-14 16:00:03 +0100 |
commit | 806c9b45edf41d54c6673fc04a6e0c06e92af101 (patch) | |
tree | 0b8ca6808a9d7b2889ab374d8f7dc5abbef61b25 /src/logicalfile/LMI_UnixSocketProvider.c | |
parent | 1295eb25a2679aa41acc57b959d7126c707e1129 (diff) | |
download | openlmi-providers-806c9b45edf41d54c6673fc04a6e0c06e92af101.tar.gz openlmi-providers-806c9b45edf41d54c6673fc04a6e0c06e92af101.tar.xz openlmi-providers-806c9b45edf41d54c6673fc04a6e0c06e92af101.zip |
LogicalFile: add socket file type and root directory association
Add LMI_UnixSocket and LMI_RootDirectory association. LMI_RootDirectory
associates the root directory with the computer system on which it resides.
Diffstat (limited to 'src/logicalfile/LMI_UnixSocketProvider.c')
-rw-r--r-- | src/logicalfile/LMI_UnixSocketProvider.c | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/src/logicalfile/LMI_UnixSocketProvider.c b/src/logicalfile/LMI_UnixSocketProvider.c new file mode 100644 index 0000000..c122502 --- /dev/null +++ b/src/logicalfile/LMI_UnixSocketProvider.c @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2012 Red Hat, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Authors: Jan Synacek <jsynacek@redhat.com> + */ +#include <konkret/konkret.h> +#include "LMI_UnixSocket.h" +#include "file.h" + +static const CMPIBroker* _cb = NULL; + +static void LMI_UnixSocketInitialize() +{ +} + +static CMPIStatus LMI_UnixSocketCleanup( + CMPIInstanceMI* mi, + const CMPIContext* cc, + CMPIBoolean term) +{ + CMReturn(CMPI_RC_OK); +} + +static CMPIStatus LMI_UnixSocketEnumInstanceNames( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus LMI_UnixSocketEnumInstances( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus LMI_UnixSocketGetInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) +{ + get_instance(UnixSocket, S_IFSOCK, "No such socket: %s"); + CMReturn(CMPI_RC_OK); +} + +static CMPIStatus LMI_UnixSocketCreateInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus LMI_UnixSocketModifyInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci, + const char** properties) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus LMI_UnixSocketDeleteInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus LMI_UnixSocketExecQuery( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* lang, + const char* query) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +CMInstanceMIStub( + LMI_UnixSocket, + LMI_UnixSocket, + _cb, + LMI_UnixSocketInitialize()) + +static CMPIStatus LMI_UnixSocketMethodCleanup( + CMPIMethodMI* mi, + const CMPIContext* cc, + CMPIBoolean term) +{ + CMReturn(CMPI_RC_OK); +} + +static CMPIStatus LMI_UnixSocketInvokeMethod( + CMPIMethodMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* meth, + const CMPIArgs* in, + CMPIArgs* out) +{ + return LMI_UnixSocket_DispatchMethod( + _cb, mi, cc, cr, cop, meth, in, out); +} + +CMMethodMIStub( + LMI_UnixSocket, + LMI_UnixSocket, + _cb, + LMI_UnixSocketInitialize()) + +KONKRET_REGISTRATION( + "root/cimv2", + "LMI_UnixSocket", + "LMI_UnixSocket", + "instance method") +/* vi: set et: */ |