Commit b1522da4 by 李维杰

add linice demo

parents

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2046
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P2pNiceDemo", "P2pNiceDemo\P2pNiceDemo.vcxproj", "{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Debug|x64.ActiveCfg = Debug|x64
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Debug|x64.Build.0 = Debug|x64
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Debug|x86.ActiveCfg = Debug|Win32
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Debug|x86.Build.0 = Debug|Win32
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Release|x64.ActiveCfg = Release|x64
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Release|x64.Build.0 = Release|x64
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Release|x86.ActiveCfg = Release|Win32
{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {490606CD-9DDF-4A30-8CA4-E0EADB7E2BF8}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{58DA2AC1-56E4-4443-AA3E-BD395257F2C6}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>P2pNiceDemo</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>thirdparty/libnice/nice;thirdparty/libnice/agent;thirdparty/glib/;thirdparty/glib/glib;thirdparty/glib/gio;thirdparty/glib/gmodule;thirdparty/glib/gobject;thirdparty/glib/gthread;thirdparty/jsoncpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>thirdparty/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="p2p\p2p_utilities.h" />
<ClInclude Include="p2p\p2p_wrapper.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="thirdparty\jsoncpp\src\json_tool.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="P2pNiceDemo.cpp" />
<ClCompile Include="p2p\p2p_utilities.cc" />
<ClCompile Include="p2p\p2p_wrapper.cc" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="thirdparty\jsoncpp\src\json_reader.cpp" />
<ClCompile Include="thirdparty\jsoncpp\src\json_value.cpp" />
<ClCompile Include="thirdparty\jsoncpp\src\json_writer.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="thirdparty\jsoncpp\src\json_valueiterator.inl" />
<None Include="thirdparty\jsoncpp\src\version.h.in" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="源文件\p2p">
<UniqueIdentifier>{bea3f7a7-0450-476a-88ca-4887e899e92c}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\jsoncpp">
<UniqueIdentifier>{d012692c-82e0-440f-be70-b1493d797e1e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="p2p\p2p_utilities.h">
<Filter>源文件\p2p</Filter>
</ClInclude>
<ClInclude Include="p2p\p2p_wrapper.h">
<Filter>源文件\p2p</Filter>
</ClInclude>
<ClInclude Include="thirdparty\jsoncpp\src\json_tool.h">
<Filter>源文件\jsoncpp</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="P2pNiceDemo.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="p2p\p2p_utilities.cc">
<Filter>源文件\p2p</Filter>
</ClCompile>
<ClCompile Include="p2p\p2p_wrapper.cc">
<Filter>源文件\p2p</Filter>
</ClCompile>
<ClCompile Include="thirdparty\jsoncpp\src\json_reader.cpp">
<Filter>源文件\jsoncpp</Filter>
</ClCompile>
<ClCompile Include="thirdparty\jsoncpp\src\json_value.cpp">
<Filter>源文件\jsoncpp</Filter>
</ClCompile>
<ClCompile Include="thirdparty\jsoncpp\src\json_writer.cpp">
<Filter>源文件\jsoncpp</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="thirdparty\jsoncpp\src\json_valueiterator.inl">
<Filter>源文件\jsoncpp</Filter>
</None>
<None Include="thirdparty\jsoncpp\src\version.h.in">
<Filter>源文件\jsoncpp</Filter>
</None>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
#include "p2p_utilities.h"
#include "gio/gnetworking.h"
#include "json/json.h"
namespace offcn
{
static const std::string kCandidateTypes[] = { "host", "srflx", "prflx", "relay" };
bool BuildCandidatesString(NiceAgent *agent, guint stream_id, std::string &candidates)
{
bool result = false;
Json::Value message;
Json::Value candArray;
Json::StreamWriterBuilder writerBuilder;
writerBuilder["commentStyle"] = "None"; //̶ôд
writerBuilder["indentation"] = " "; //̶ôд
gchar *ufrag = NULL;
gchar *password = NULL;
gchar ipaddr[INET6_ADDRSTRLEN] = { 0 };
guint port = 0;
std::string foundation;
guint priority = 0;
std::string type;
GSList *cands = NULL;
GSList *item = NULL;
if (!nice_agent_get_local_credentials(agent, stream_id, &ufrag, &password))
{
return false;
}
cands = nice_agent_get_local_candidates(agent, stream_id, 1);
if (cands == NULL)
{
goto Error;
}
message["ufrag"] = ufrag;
message["password"] = password;
for (item = cands; item; item = item->next)
{
NiceCandidate *c = (NiceCandidate *)item->data;
nice_address_to_string(&c->addr, ipaddr);
port = nice_address_get_port(&c->addr);
if (port == 0) continue;
foundation = c->foundation;
type = kCandidateTypes[c->type];
priority = c->priority;
//if (nice_address_ip_version(&c->addr) == 6) continue;
//if (c->type != 1) continue;
Json::Value item;
item["ip"] = ipaddr;
item["port"] = port;
item["priority"] = priority;
item["type"] = type;
item["foundation"] = foundation;
candArray.append(item);
}
message["candidates"] = candArray;
candidates = Json::writeString(writerBuilder, message);
result = true;
Error:
if (ufrag)
{
g_free(ufrag);
}
if (password)
{
g_free(password);
}
if (cands) g_slist_free_full(cands, (GDestroyNotify)&nice_candidate_free);
return result;
}
bool ParseCandidatesString(std::string &candidates, unsigned int stream_id, std::string &ufrag, std::string &password, GSList **list)
{
Json::Value root;
Json::CharReaderBuilder readerBuilder;
const char *start_pos = candidates.c_str();
std::string error;
std::unique_ptr<Json::CharReader> const reader(readerBuilder.newCharReader());
if (!reader->parse(start_pos, start_pos + candidates.length(), &root, &error))
{
return false;
}
if (!root["ufrag"] || !root["password"] || !root["candidates"])
{
return false;
}
ufrag = root["ufrag"].asString();
password = root["password"].asString();
Json::Value candList = root["candidates"];
for (int i = 0; i < candList.size(); i++)
{
Json::Value item = candList[i];
if (!item["type"] || !item["ip"] || !item["port"] || !item["priority"])
{
continue;
}
std::string type = item["type"].asString();
std::string ip = item["ip"].asString();
std::string foundation = item["foundation"].asString();
unsigned short port = item["port"].asUInt();
unsigned int priority = item["priority"].asUInt();
NiceCandidateType cType = NICE_CANDIDATE_TYPE_HOST;
for (unsigned int index = 0; index < G_N_ELEMENTS(kCandidateTypes); index++)
{
if (type.compare(kCandidateTypes[index]) == 0)
{
cType = (NiceCandidateType)index;
break;
}
}
NiceCandidate *cand = nice_candidate_new(cType);
cand->component_id = 1;
cand->stream_id = stream_id;
cand->transport = NICE_CANDIDATE_TRANSPORT_UDP;
cand->priority = priority;
strcpy_s(cand->foundation, NICE_CANDIDATE_MAX_FOUNDATION, foundation.c_str());
if (!nice_address_set_from_string(&cand->addr, ip.c_str()))
{
nice_candidate_free(cand);
cand = NULL;
continue;
}
nice_address_set_port(&cand->addr, port);
*list = g_slist_prepend(*list, cand);
}
if (*list == NULL) return false;
return true;
}
}
\ No newline at end of file
#pragma once
extern "C"
{
#include "nice.h"
}
#include <string>
namespace offcn
{
bool BuildCandidatesString(NiceAgent *agent, guint stream_id, std::string &candidates);
bool ParseCandidatesString(std::string &candidates, unsigned int stream_id, std::string &ufrag, std::string &password, GSList **list);
}
\ No newline at end of file
#include "p2p_wrapper.h"
#include "gio/gnetworking.h"
#include "json/json.h"
#include "p2p_utilities.h"
#pragma comment(lib, "ffi.lib")
#pragma comment(lib, "gio-2.0.lib")
#pragma comment(lib, "glib-2.0.lib")
#pragma comment(lib, "gmodule-2.0.lib")
#pragma comment(lib, "gobject-2.0.lib")
#pragma comment(lib, "gthread-2.0.lib")
#pragma comment(lib, "intl.lib")
#pragma comment(lib, "libcrypto.lib")
#pragma comment(lib, "libssl.lib")
#pragma comment(lib, "z.lib")
#pragma comment(lib, "nice.lib")
namespace offcn
{
std::thread *P2pWrapper::net_thread_ = NULL;
GMainLoop *P2pWrapper::g_main_loop_ = NULL;
bool P2pWrapper::InitP2pEnv()
{
g_networking_init();
g_main_loop_ = g_main_loop_new(NULL, false);
if (g_main_loop_ == NULL)
{
return false;
}
net_thread_ = new std::thread(NetThreadCallback);
return true;
}
void P2pWrapper::UnInitP2pEnv()
{
if (g_main_loop_)
{
g_main_loop_quit(g_main_loop_);
g_main_loop_unref(g_main_loop_);
}
if (net_thread_)
{
net_thread_->join();
delete net_thread_;
net_thread_ = NULL;
}
}
P2pWrapper::P2pWrapper()
:agent_(NULL),
stream_id_(0)
{
}
P2pWrapper::~P2pWrapper()
{
Stop();
}
bool P2pWrapper::Start(std::string stun_ip, int stun_port, bool is_controller)
{
GMainContext *ctx = g_main_loop_get_context(g_main_loop_);
agent_ = nice_agent_new(ctx, NICE_COMPATIBILITY_RFC5245);
if (agent_ == NULL)
{
return false;
}
g_object_set(agent_, "stun-server", stun_ip.c_str(), NULL);
g_object_set(agent_, "stun-server-port", stun_port, NULL);
if (is_controller)
{
g_object_set(agent_, "controlling-mode", 1, NULL);
}
else
{
g_object_set(agent_, "controlling-mode", 0, NULL);
}
g_signal_connect(agent_, "candidate-gathering-done", G_CALLBACK(cb_candidate_gather_done), NULL);
g_signal_connect(agent_, "new-selected-pair", G_CALLBACK(cb_new_selected_pair), NULL);
g_signal_connect(agent_, "component-state-changed", G_CALLBACK(cb_component_state_changed), NULL);
stream_id_ = nice_agent_add_stream(agent_, 1);
if (stream_id_ == 0)
{
goto Error;
}
// Attach to the component to receive the data
// Without this call, candidates cannot be gathered
nice_agent_attach_recv(agent_, stream_id_, 1, ctx, cb_nice_recv, NULL);
// Start gathering local candidates
if (!nice_agent_gather_candidates(agent_, stream_id_))
{
goto Error;
}
return true;
Error:
Stop();
return false;
}
void P2pWrapper::Stop()
{
if (agent_)
{
g_object_unref(agent_);
}
}
bool P2pWrapper::SetRemoteCandidate(std::string candidates)
{
GSList *candidate_list = NULL;
std::string ufrag;
std::string password;
if (!ParseCandidatesString(candidates, stream_id_, ufrag, password, &candidate_list)) return false;
if (!nice_agent_set_remote_credentials(agent_, stream_id_, ufrag.c_str(), password.c_str()))
{
goto Error;
}
if(!nice_agent_set_remote_candidates(agent_, stream_id_, 1, candidate_list))
{
goto Error;
}
return true;
Error:
if (candidate_list)
{
g_slist_free_full(candidate_list, (GDestroyNotify)&nice_candidate_free);
}
return false;
}
int P2pWrapper::SendData(const char *buffer, int len)
{
return nice_agent_send(agent_, stream_id_, 1, len, buffer);
}
void P2pWrapper::NetThreadCallback()
{
g_main_loop_run(g_main_loop_);
}
int P2pWrapper::candidate_gather_done(NiceAgent *agent, guint stream_id)
{
std::string candidates;
if (BuildCandidatesString(agent, stream_id, candidates))
{
printf("--->local candidates = %s\n", candidates.c_str());
FILE *file = fopen("./1.txt", "ab+");
fwrite(candidates.c_str(), 1, candidates.length(), file);
fclose(file);
return 0;
}
return -1;
}
void P2pWrapper::new_selected_pair(NiceAgent *agent, guint stream_id, guint component_id, gchar *lfoundation, gchar *rfoundation)
{
printf("----new_selected_pair----\n");
}
void P2pWrapper::component_state_changed(NiceAgent *agent, guint stream_id, guint component_id, guint state)
{
printf("----component_state_changed----%u\n", state);
}
void P2pWrapper::nice_recv(NiceAgent *agent, guint stream_id, guint component_id, guint len, gchar *buf)
{
char szBuffer[1500] = { 0 };
memcpy(szBuffer, buf, len);
printf("----nice_recv----%s, len = %d\n", szBuffer, len);
}
}
\ No newline at end of file
#pragma once
#include <string>
#include <thread>
extern "C"
{
#include "nice.h"
}
namespace offcn
{
class P2pWrapperObserver
{
public:
virtual void OnGetLocalCandidates(std::string candidates) = 0;
};
class P2pWrapper
{
public:
P2pWrapper();
~P2pWrapper();
public:
static bool InitP2pEnv();
static void UnInitP2pEnv();
public:
bool Start(std::string stun_ip, int stun_port, bool is_controller);
void Stop();
bool SetRemoteCandidate(std::string candidates);
int SendData(const char *buffer, int len);
private:
static int cb_candidate_gather_done(NiceAgent *agent, guint stream_id, gpointer data)
{
P2pWrapper *wrapper = (P2pWrapper *)data;
return wrapper->candidate_gather_done(agent, stream_id);
}
static void cb_new_selected_pair(NiceAgent *agent, guint stream_id, guint component_id, gchar *lfoundation, gchar *rfoundation, gpointer data)
{
P2pWrapper *wrapper = (P2pWrapper *)data;
wrapper->new_selected_pair(agent, stream_id, component_id, lfoundation, rfoundation);
}
static void cb_component_state_changed(NiceAgent *agent, guint stream_id, guint component_id, guint state, gpointer data)
{
P2pWrapper *wrapper = (P2pWrapper *)data;
wrapper->component_state_changed(agent, stream_id, component_id, state);
}
static void cb_nice_recv(NiceAgent *agent, guint stream_id, guint component_id, guint len, gchar *buf, gpointer data)
{
P2pWrapper *wrapper = (P2pWrapper *)data;
wrapper->nice_recv(agent, stream_id, component_id, len, buf);
}
static void NetThreadCallback();
private:
int candidate_gather_done(NiceAgent *agent, guint stream_id);
void new_selected_pair(NiceAgent *agent, guint stream_id, guint component_id, gchar *lfoundation, gchar *rfoundation);
void component_state_changed(NiceAgent *agent, guint stream_id, guint component_id, guint state);
void nice_recv(NiceAgent *agent, guint stream_id, guint component_id, guint len, gchar *buf);
private:
NiceAgent *agent_;
unsigned int stream_id_;
public:
static std::thread *net_thread_;
static GMainLoop *g_main_loop_;
};
}
\ No newline at end of file
#include "gio/gio.h"
#include "glib/glib.h"
int LLVMFuzzerTestOneInput (const unsigned char *data, size_t size);
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
static GLogWriterOutput
empty_logging_func (GLogLevelFlags log_level, const GLogField *fields,
gsize n_fields, gpointer user_data)
{
return G_LOG_WRITER_HANDLED;
}
#endif
/* Disables logging for oss-fuzz. Must be used with each target. */
static void
fuzz_set_logging_func (void)
{
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
g_log_set_writer_func (empty_logging_func, NULL, NULL);
#endif
}
/*
* Copyright © 2010 Codethink Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_ACTION_H__
#define __G_ACTION_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_ACTION (g_action_get_type ())
#define G_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_ACTION, GAction))
#define G_IS_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_ACTION))
#define G_ACTION_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
G_TYPE_ACTION, GActionInterface))
typedef struct _GActionInterface GActionInterface;
struct _GActionInterface
{
GTypeInterface g_iface;
/* virtual functions */
const gchar * (* get_name) (GAction *action);
const GVariantType * (* get_parameter_type) (GAction *action);
const GVariantType * (* get_state_type) (GAction *action);
GVariant * (* get_state_hint) (GAction *action);
gboolean (* get_enabled) (GAction *action);
GVariant * (* get_state) (GAction *action);
void (* change_state) (GAction *action,
GVariant *value);
void (* activate) (GAction *action,
GVariant *parameter);
};
GLIB_AVAILABLE_IN_2_30
GType g_action_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
const gchar * g_action_get_name (GAction *action);
GLIB_AVAILABLE_IN_ALL
const GVariantType * g_action_get_parameter_type (GAction *action);
GLIB_AVAILABLE_IN_ALL
const GVariantType * g_action_get_state_type (GAction *action);
GLIB_AVAILABLE_IN_ALL
GVariant * g_action_get_state_hint (GAction *action);
GLIB_AVAILABLE_IN_ALL
gboolean g_action_get_enabled (GAction *action);
GLIB_AVAILABLE_IN_ALL
GVariant * g_action_get_state (GAction *action);
GLIB_AVAILABLE_IN_ALL
void g_action_change_state (GAction *action,
GVariant *value);
GLIB_AVAILABLE_IN_ALL
void g_action_activate (GAction *action,
GVariant *parameter);
GLIB_AVAILABLE_IN_2_28
gboolean g_action_name_is_valid (const gchar *action_name);
GLIB_AVAILABLE_IN_2_38
gboolean g_action_parse_detailed_name (const gchar *detailed_name,
gchar **action_name,
GVariant **target_value,
GError **error);
GLIB_AVAILABLE_IN_2_38
gchar * g_action_print_detailed_name (const gchar *action_name,
GVariant *target_value);
G_END_DECLS
#endif /* __G_ACTION_H__ */
/*
* Copyright © 2010 Codethink Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_ACTION_GROUP_H__
#define __G_ACTION_GROUP_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_ACTION_GROUP (g_action_group_get_type ())
#define G_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_ACTION_GROUP, GActionGroup))
#define G_IS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_ACTION_GROUP))
#define G_ACTION_GROUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
G_TYPE_ACTION_GROUP, GActionGroupInterface))
typedef struct _GActionGroupInterface GActionGroupInterface;
struct _GActionGroupInterface
{
GTypeInterface g_iface;
/* virtual functions */
gboolean (* has_action) (GActionGroup *action_group,
const gchar *action_name);
gchar ** (* list_actions) (GActionGroup *action_group);
gboolean (* get_action_enabled) (GActionGroup *action_group,
const gchar *action_name);
const GVariantType * (* get_action_parameter_type) (GActionGroup *action_group,
const gchar *action_name);
const GVariantType * (* get_action_state_type) (GActionGroup *action_group,
const gchar *action_name);
GVariant * (* get_action_state_hint) (GActionGroup *action_group,
const gchar *action_name);
GVariant * (* get_action_state) (GActionGroup *action_group,
const gchar *action_name);
void (* change_action_state) (GActionGroup *action_group,
const gchar *action_name,
GVariant *value);
void (* activate_action) (GActionGroup *action_group,
const gchar *action_name,
GVariant *parameter);
/* signals */
void (* action_added) (GActionGroup *action_group,
const gchar *action_name);
void (* action_removed) (GActionGroup *action_group,
const gchar *action_name);
void (* action_enabled_changed) (GActionGroup *action_group,
const gchar *action_name,
gboolean enabled);
void (* action_state_changed) (GActionGroup *action_group,
const gchar *action_name,
GVariant *state);
/* more virtual functions */
gboolean (* query_action) (GActionGroup *action_group,
const gchar *action_name,
gboolean *enabled,
const GVariantType **parameter_type,
const GVariantType **state_type,
GVariant **state_hint,
GVariant **state);
};
GLIB_AVAILABLE_IN_ALL
GType g_action_group_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
gboolean g_action_group_has_action (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
gchar ** g_action_group_list_actions (GActionGroup *action_group);
GLIB_AVAILABLE_IN_ALL
const GVariantType * g_action_group_get_action_parameter_type (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
const GVariantType * g_action_group_get_action_state_type (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
GVariant * g_action_group_get_action_state_hint (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
gboolean g_action_group_get_action_enabled (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
GVariant * g_action_group_get_action_state (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
void g_action_group_change_action_state (GActionGroup *action_group,
const gchar *action_name,
GVariant *value);
GLIB_AVAILABLE_IN_ALL
void g_action_group_activate_action (GActionGroup *action_group,
const gchar *action_name,
GVariant *parameter);
/* signals */
GLIB_AVAILABLE_IN_ALL
void g_action_group_action_added (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
void g_action_group_action_removed (GActionGroup *action_group,
const gchar *action_name);
GLIB_AVAILABLE_IN_ALL
void g_action_group_action_enabled_changed (GActionGroup *action_group,
const gchar *action_name,
gboolean enabled);
GLIB_AVAILABLE_IN_ALL
void g_action_group_action_state_changed (GActionGroup *action_group,
const gchar *action_name,
GVariant *state);
GLIB_AVAILABLE_IN_2_32
gboolean g_action_group_query_action (GActionGroup *action_group,
const gchar *action_name,
gboolean *enabled,
const GVariantType **parameter_type,
const GVariantType **state_type,
GVariant **state_hint,
GVariant **state);
G_END_DECLS
#endif /* __G_ACTION_GROUP_H__ */
/*
* Copyright © 2010 Codethink Limited
* Copyright © 2011 Canonical Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_ACTION_GROUP_EXPORTER_H__
#define __G_ACTION_GROUP_EXPORTER_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
GLIB_AVAILABLE_IN_2_32
guint g_dbus_connection_export_action_group (GDBusConnection *connection,
const gchar *object_path,
GActionGroup *action_group,
GError **error);
GLIB_AVAILABLE_IN_2_32
void g_dbus_connection_unexport_action_group (GDBusConnection *connection,
guint export_id);
G_END_DECLS
#endif /* __G_ACTION_GROUP_EXPORTER_H__ */
/*
* Copyright © 2010 Codethink Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_ACTION_MAP_H__
#define __G_ACTION_MAP_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_ACTION_MAP (g_action_map_get_type ())
#define G_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_ACTION_MAP, GActionMap))
#define G_IS_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_ACTION_MAP))
#define G_ACTION_MAP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
G_TYPE_ACTION_MAP, GActionMapInterface))
typedef struct _GActionMapInterface GActionMapInterface;
typedef struct _GActionEntry GActionEntry;
struct _GActionMapInterface
{
GTypeInterface g_iface;
GAction * (* lookup_action) (GActionMap *action_map,
const gchar *action_name);
void (* add_action) (GActionMap *action_map,
GAction *action);
void (* remove_action) (GActionMap *action_map,
const gchar *action_name);
};
struct _GActionEntry
{
const gchar *name;
void (* activate) (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
const gchar *parameter_type;
const gchar *state;
void (* change_state) (GSimpleAction *action,
GVariant *value,
gpointer user_data);
/*< private >*/
gsize padding[3];
};
GLIB_AVAILABLE_IN_2_32
GType g_action_map_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
GAction * g_action_map_lookup_action (GActionMap *action_map,
const gchar *action_name);
GLIB_AVAILABLE_IN_2_32
void g_action_map_add_action (GActionMap *action_map,
GAction *action);
GLIB_AVAILABLE_IN_2_32
void g_action_map_remove_action (GActionMap *action_map,
const gchar *action_name);
GLIB_AVAILABLE_IN_2_32
void g_action_map_add_action_entries (GActionMap *action_map,
const GActionEntry *entries,
gint n_entries,
gpointer user_data);
G_END_DECLS
#endif /* __G_ACTION_MAP_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright © 2013 Canonical Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_APP_INFO_PRIVATE_H__
#define __G_APP_INFO_PRIVATE_H__
void g_app_info_monitor_fire (void);
#endif /* __G_APP_INFO_PRIVATE_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright © 2010 Codethink Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_APPLICATION_COMMAND_LINE_H__
#define __G_APPLICATION_COMMAND_LINE_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_APPLICATION_COMMAND_LINE (g_application_command_line_get_type ())
#define G_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_APPLICATION_COMMAND_LINE, \
GApplicationCommandLine))
#define G_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
G_TYPE_APPLICATION_COMMAND_LINE, \
GApplicationCommandLineClass))
#define G_IS_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_APPLICATION_COMMAND_LINE))
#define G_IS_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
G_TYPE_APPLICATION_COMMAND_LINE))
#define G_APPLICATION_COMMAND_LINE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
G_TYPE_APPLICATION_COMMAND_LINE, \
GApplicationCommandLineClass))
typedef struct _GApplicationCommandLinePrivate GApplicationCommandLinePrivate;
typedef struct _GApplicationCommandLineClass GApplicationCommandLineClass;
struct _GApplicationCommandLine
{
/*< private >*/
GObject parent_instance;
GApplicationCommandLinePrivate *priv;
};
struct _GApplicationCommandLineClass
{
/*< private >*/
GObjectClass parent_class;
void (* print_literal) (GApplicationCommandLine *cmdline,
const gchar *message);
void (* printerr_literal) (GApplicationCommandLine *cmdline,
const gchar *message);
GInputStream * (* get_stdin) (GApplicationCommandLine *cmdline);
gpointer padding[11];
};
GLIB_AVAILABLE_IN_ALL
GType g_application_command_line_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
gchar ** g_application_command_line_get_arguments (GApplicationCommandLine *cmdline,
int *argc);
GLIB_AVAILABLE_IN_2_40
GVariantDict * g_application_command_line_get_options_dict (GApplicationCommandLine *cmdline);
GLIB_AVAILABLE_IN_2_36
GInputStream * g_application_command_line_get_stdin (GApplicationCommandLine *cmdline);
GLIB_AVAILABLE_IN_ALL
const gchar * const * g_application_command_line_get_environ (GApplicationCommandLine *cmdline);
GLIB_AVAILABLE_IN_ALL
const gchar * g_application_command_line_getenv (GApplicationCommandLine *cmdline,
const gchar *name);
GLIB_AVAILABLE_IN_ALL
const gchar * g_application_command_line_get_cwd (GApplicationCommandLine *cmdline);
GLIB_AVAILABLE_IN_ALL
gboolean g_application_command_line_get_is_remote (GApplicationCommandLine *cmdline);
GLIB_AVAILABLE_IN_ALL
void g_application_command_line_print (GApplicationCommandLine *cmdline,
const gchar *format,
...) G_GNUC_PRINTF(2, 3);
GLIB_AVAILABLE_IN_ALL
void g_application_command_line_printerr (GApplicationCommandLine *cmdline,
const gchar *format,
...) G_GNUC_PRINTF(2, 3);
GLIB_AVAILABLE_IN_ALL
int g_application_command_line_get_exit_status (GApplicationCommandLine *cmdline);
GLIB_AVAILABLE_IN_ALL
void g_application_command_line_set_exit_status (GApplicationCommandLine *cmdline,
int exit_status);
GLIB_AVAILABLE_IN_ALL
GVariant * g_application_command_line_get_platform_data (GApplicationCommandLine *cmdline);
GLIB_AVAILABLE_IN_2_36
GFile * g_application_command_line_create_file_for_arg (GApplicationCommandLine *cmdline,
const gchar *arg);
G_END_DECLS
#endif /* __G_APPLICATION_COMMAND_LINE_H__ */
#include "giotypes.h"
typedef struct _GApplicationImpl GApplicationImpl;
typedef struct
{
gchar *name;
GVariantType *parameter_type;
gboolean enabled;
GVariant *state;
} RemoteActionInfo;
void g_application_impl_destroy (GApplicationImpl *impl);
GApplicationImpl * g_application_impl_register (GApplication *application,
const gchar *appid,
GApplicationFlags flags,
GActionGroup *exported_actions,
GRemoteActionGroup **remote_actions,
GCancellable *cancellable,
GError **error);
void g_application_impl_activate (GApplicationImpl *impl,
GVariant *platform_data);
void g_application_impl_open (GApplicationImpl *impl,
GFile **files,
gint n_files,
const gchar *hint,
GVariant *platform_data);
int g_application_impl_command_line (GApplicationImpl *impl,
const gchar *const *arguments,
GVariant *platform_data);
void g_application_impl_flush (GApplicationImpl *impl);
GDBusConnection * g_application_impl_get_dbus_connection (GApplicationImpl *impl);
const gchar * g_application_impl_get_dbus_object_path (GApplicationImpl *impl);
void g_application_impl_set_busy_state (GApplicationImpl *impl,
gboolean busy);
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_ASYNC_HELPER_H__
#define __G_ASYNC_HELPER_H__
#include <gio/gio.h>
#ifdef G_OS_WIN32
#include <windows.h>
#endif
G_BEGIN_DECLS
#ifdef G_OS_WIN32
gboolean _g_win32_overlap_wait_result (HANDLE hfile,
OVERLAPPED *overlap,
DWORD *transferred,
GCancellable *cancellable);
#endif
G_END_DECLS
#endif /* __G_ASYNC_HELPER_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2009 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_ASYNC_INITABLE_H__
#define __G_ASYNC_INITABLE_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
#include <gio/ginitable.h>
G_BEGIN_DECLS
#define G_TYPE_ASYNC_INITABLE (g_async_initable_get_type ())
#define G_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitable))
#define G_IS_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_INITABLE))
#define G_ASYNC_INITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitableIface))
#define G_TYPE_IS_ASYNC_INITABLE(type) (g_type_is_a ((type), G_TYPE_ASYNC_INITABLE))
/**
* GAsyncInitable:
*
* Interface for asynchronously initializable objects.
*
* Since: 2.22
**/
typedef struct _GAsyncInitableIface GAsyncInitableIface;
/**
* GAsyncInitableIface:
* @g_iface: The parent interface.
* @init_async: Starts initialization of the object.
* @init_finish: Finishes initialization of the object.
*
* Provides an interface for asynchronous initializing object such that
* initialization may fail.
*
* Since: 2.22
**/
struct _GAsyncInitableIface
{
GTypeInterface g_iface;
/* Virtual Table */
void (* init_async) (GAsyncInitable *initable,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* init_finish) (GAsyncInitable *initable,
GAsyncResult *res,
GError **error);
};
GLIB_AVAILABLE_IN_ALL
GType g_async_initable_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
void g_async_initable_init_async (GAsyncInitable *initable,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
gboolean g_async_initable_init_finish (GAsyncInitable *initable,
GAsyncResult *res,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_async_initable_new_async (GType object_type,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data,
const gchar *first_property_name,
...);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_async_initable_init_async)
void g_async_initable_newv_async (GType object_type,
guint n_parameters,
GParameter *parameters,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
G_GNUC_END_IGNORE_DEPRECATIONS
GLIB_AVAILABLE_IN_ALL
void g_async_initable_new_valist_async (GType object_type,
const gchar *first_property_name,
va_list var_args,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
GObject *g_async_initable_new_finish (GAsyncInitable *initable,
GAsyncResult *res,
GError **error);
G_END_DECLS
#endif /* __G_ASYNC_INITABLE_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_ASYNC_RESULT_H__
#define __G_ASYNC_RESULT_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_ASYNC_RESULT (g_async_result_get_type ())
#define G_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_RESULT, GAsyncResult))
#define G_IS_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_RESULT))
#define G_ASYNC_RESULT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_RESULT, GAsyncResultIface))
/**
* GAsyncResult:
*
* Holds results information for an asynchronous operation,
* usually passed directly to an asynchronous _finish() operation.
**/
typedef struct _GAsyncResultIface GAsyncResultIface;
/**
* GAsyncResultIface:
* @g_iface: The parent interface.
* @get_user_data: Gets the user data passed to the callback.
* @get_source_object: Gets the source object that issued the asynchronous operation.
* @is_tagged: Checks if a result is tagged with a particular source.
*
* Interface definition for #GAsyncResult.
**/
struct _GAsyncResultIface
{
GTypeInterface g_iface;
/* Virtual Table */
gpointer (* get_user_data) (GAsyncResult *res);
GObject * (* get_source_object) (GAsyncResult *res);
gboolean (* is_tagged) (GAsyncResult *res,
gpointer source_tag);
};
GLIB_AVAILABLE_IN_ALL
GType g_async_result_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
gpointer g_async_result_get_user_data (GAsyncResult *res);
GLIB_AVAILABLE_IN_ALL
GObject *g_async_result_get_source_object (GAsyncResult *res);
GLIB_AVAILABLE_IN_2_34
gboolean g_async_result_legacy_propagate_error (GAsyncResult *res,
GError **error);
GLIB_AVAILABLE_IN_2_34
gboolean g_async_result_is_tagged (GAsyncResult *res,
gpointer source_tag);
G_END_DECLS
#endif /* __G_ASYNC_RESULT_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Christian Kellner <gicmo@gnome.org>
*/
#ifndef __G_BUFFERED_INPUT_STREAM_H__
#define __G_BUFFERED_INPUT_STREAM_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/gfilterinputstream.h>
G_BEGIN_DECLS
#define G_TYPE_BUFFERED_INPUT_STREAM (g_buffered_input_stream_get_type ())
#define G_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStream))
#define G_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass))
#define G_IS_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_INPUT_STREAM))
#define G_IS_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_INPUT_STREAM))
#define G_BUFFERED_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass))
/**
* GBufferedInputStream:
*
* Implements #GFilterInputStream with a sized input buffer.
**/
typedef struct _GBufferedInputStreamClass GBufferedInputStreamClass;
typedef struct _GBufferedInputStreamPrivate GBufferedInputStreamPrivate;
struct _GBufferedInputStream
{
GFilterInputStream parent_instance;
/*< private >*/
GBufferedInputStreamPrivate *priv;
};
struct _GBufferedInputStreamClass
{
GFilterInputStreamClass parent_class;
gssize (* fill) (GBufferedInputStream *stream,
gssize count,
GCancellable *cancellable,
GError **error);
/* Async ops: (optional in derived classes) */
void (* fill_async) (GBufferedInputStream *stream,
gssize count,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gssize (* fill_finish) (GBufferedInputStream *stream,
GAsyncResult *result,
GError **error);
/*< private >*/
/* Padding for future expansion */
void (*_g_reserved1) (void);
void (*_g_reserved2) (void);
void (*_g_reserved3) (void);
void (*_g_reserved4) (void);
void (*_g_reserved5) (void);
};
GLIB_AVAILABLE_IN_ALL
GType g_buffered_input_stream_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GInputStream* g_buffered_input_stream_new (GInputStream *base_stream);
GLIB_AVAILABLE_IN_ALL
GInputStream* g_buffered_input_stream_new_sized (GInputStream *base_stream,
gsize size);
GLIB_AVAILABLE_IN_ALL
gsize g_buffered_input_stream_get_buffer_size (GBufferedInputStream *stream);
GLIB_AVAILABLE_IN_ALL
void g_buffered_input_stream_set_buffer_size (GBufferedInputStream *stream,
gsize size);
GLIB_AVAILABLE_IN_ALL
gsize g_buffered_input_stream_get_available (GBufferedInputStream *stream);
GLIB_AVAILABLE_IN_ALL
gsize g_buffered_input_stream_peek (GBufferedInputStream *stream,
void *buffer,
gsize offset,
gsize count);
GLIB_AVAILABLE_IN_ALL
const void* g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream,
gsize *count);
GLIB_AVAILABLE_IN_ALL
gssize g_buffered_input_stream_fill (GBufferedInputStream *stream,
gssize count,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
gssize count,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
gssize g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
GAsyncResult *result,
GError **error);
GLIB_AVAILABLE_IN_ALL
int g_buffered_input_stream_read_byte (GBufferedInputStream *stream,
GCancellable *cancellable,
GError **error);
G_END_DECLS
#endif /* __G_BUFFERED_INPUT_STREAM_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Christian Kellner <gicmo@gnome.org>
*/
#ifndef __G_BUFFERED_OUTPUT_STREAM_H__
#define __G_BUFFERED_OUTPUT_STREAM_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/gfilteroutputstream.h>
G_BEGIN_DECLS
#define G_TYPE_BUFFERED_OUTPUT_STREAM (g_buffered_output_stream_get_type ())
#define G_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStream))
#define G_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass))
#define G_IS_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_OUTPUT_STREAM))
#define G_IS_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_OUTPUT_STREAM))
#define G_BUFFERED_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass))
/**
* GBufferedOutputStream:
*
* An implementation of #GFilterOutputStream with a sized buffer.
**/
typedef struct _GBufferedOutputStreamClass GBufferedOutputStreamClass;
typedef struct _GBufferedOutputStreamPrivate GBufferedOutputStreamPrivate;
struct _GBufferedOutputStream
{
GFilterOutputStream parent_instance;
/*< protected >*/
GBufferedOutputStreamPrivate *priv;
};
struct _GBufferedOutputStreamClass
{
GFilterOutputStreamClass parent_class;
/*< private >*/
/* Padding for future expansion */
void (*_g_reserved1) (void);
void (*_g_reserved2) (void);
};
GLIB_AVAILABLE_IN_ALL
GType g_buffered_output_stream_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GOutputStream* g_buffered_output_stream_new (GOutputStream *base_stream);
GLIB_AVAILABLE_IN_ALL
GOutputStream* g_buffered_output_stream_new_sized (GOutputStream *base_stream,
gsize size);
GLIB_AVAILABLE_IN_ALL
gsize g_buffered_output_stream_get_buffer_size (GBufferedOutputStream *stream);
GLIB_AVAILABLE_IN_ALL
void g_buffered_output_stream_set_buffer_size (GBufferedOutputStream *stream,
gsize size);
GLIB_AVAILABLE_IN_ALL
gboolean g_buffered_output_stream_get_auto_grow (GBufferedOutputStream *stream);
GLIB_AVAILABLE_IN_ALL
void g_buffered_output_stream_set_auto_grow (GBufferedOutputStream *stream,
gboolean auto_grow);
G_END_DECLS
#endif /* __G_BUFFERED_OUTPUT_STREAM_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_BYTES_ICON_H__
#define __G_BYTES_ICON_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_BYTES_ICON (g_bytes_icon_get_type ())
#define G_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_BYTES_ICON, GBytesIcon))
#define G_IS_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_BYTES_ICON))
/**
* GBytesIcon:
*
* Gets an icon for a #GBytes. Implements #GLoadableIcon.
**/
GLIB_AVAILABLE_IN_2_38
GType g_bytes_icon_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_38
GIcon * g_bytes_icon_new (GBytes *bytes);
GLIB_AVAILABLE_IN_2_38
GBytes * g_bytes_icon_get_bytes (GBytesIcon *icon);
G_END_DECLS
#endif /* __G_BYTES_ICON_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_CANCELLABLE_H__
#define __G_CANCELLABLE_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_CANCELLABLE (g_cancellable_get_type ())
#define G_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CANCELLABLE, GCancellable))
#define G_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CANCELLABLE, GCancellableClass))
#define G_IS_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CANCELLABLE))
#define G_IS_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CANCELLABLE))
#define G_CANCELLABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CANCELLABLE, GCancellableClass))
/**
* GCancellable:
*
* Allows actions to be cancelled.
*/
typedef struct _GCancellableClass GCancellableClass;
typedef struct _GCancellablePrivate GCancellablePrivate;
struct _GCancellable
{
GObject parent_instance;
/*< private >*/
GCancellablePrivate *priv;
};
struct _GCancellableClass
{
GObjectClass parent_class;
void (* cancelled) (GCancellable *cancellable);
/*< private >*/
/* Padding for future expansion */
void (*_g_reserved1) (void);
void (*_g_reserved2) (void);
void (*_g_reserved3) (void);
void (*_g_reserved4) (void);
void (*_g_reserved5) (void);
};
GLIB_AVAILABLE_IN_ALL
GType g_cancellable_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GCancellable *g_cancellable_new (void);
/* These are only safe to call inside a cancellable op */
GLIB_AVAILABLE_IN_ALL
gboolean g_cancellable_is_cancelled (GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL
gboolean g_cancellable_set_error_if_cancelled (GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
int g_cancellable_get_fd (GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL
gboolean g_cancellable_make_pollfd (GCancellable *cancellable,
GPollFD *pollfd);
GLIB_AVAILABLE_IN_ALL
void g_cancellable_release_fd (GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL
GSource * g_cancellable_source_new (GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL
GCancellable *g_cancellable_get_current (void);
GLIB_AVAILABLE_IN_ALL
void g_cancellable_push_current (GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL
void g_cancellable_pop_current (GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL
void g_cancellable_reset (GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL
gulong g_cancellable_connect (GCancellable *cancellable,
GCallback callback,
gpointer data,
GDestroyNotify data_destroy_func);
GLIB_AVAILABLE_IN_ALL
void g_cancellable_disconnect (GCancellable *cancellable,
gulong handler_id);
/* This is safe to call from another thread */
GLIB_AVAILABLE_IN_ALL
void g_cancellable_cancel (GCancellable *cancellable);
G_END_DECLS
#endif /* __G_CANCELLABLE_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2009 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_CHARSET_CONVERTER_H__
#define __G_CHARSET_CONVERTER_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/gconverter.h>
G_BEGIN_DECLS
#define G_TYPE_CHARSET_CONVERTER (g_charset_converter_get_type ())
#define G_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverter))
#define G_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass))
#define G_IS_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CHARSET_CONVERTER))
#define G_IS_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CHARSET_CONVERTER))
#define G_CHARSET_CONVERTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass))
typedef struct _GCharsetConverterClass GCharsetConverterClass;
struct _GCharsetConverterClass
{
GObjectClass parent_class;
};
GLIB_AVAILABLE_IN_ALL
GType g_charset_converter_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GCharsetConverter *g_charset_converter_new (const gchar *to_charset,
const gchar *from_charset,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_charset_converter_set_use_fallback (GCharsetConverter *converter,
gboolean use_fallback);
GLIB_AVAILABLE_IN_ALL
gboolean g_charset_converter_get_use_fallback (GCharsetConverter *converter);
GLIB_AVAILABLE_IN_ALL
guint g_charset_converter_get_num_fallbacks (GCharsetConverter *converter);
G_END_DECLS
#endif /* __G_CHARSET_CONVERTER_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_CONTENT_TYPE_H__
#define __G_CONTENT_TYPE_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
GLIB_AVAILABLE_IN_ALL
gboolean g_content_type_equals (const gchar *type1,
const gchar *type2);
GLIB_AVAILABLE_IN_ALL
gboolean g_content_type_is_a (const gchar *type,
const gchar *supertype);
GLIB_AVAILABLE_IN_2_52
gboolean g_content_type_is_mime_type (const gchar *type,
const gchar *mime_type);
GLIB_AVAILABLE_IN_ALL
gboolean g_content_type_is_unknown (const gchar *type);
GLIB_AVAILABLE_IN_ALL
gchar * g_content_type_get_description (const gchar *type);
GLIB_AVAILABLE_IN_ALL
gchar * g_content_type_get_mime_type (const gchar *type);
GLIB_AVAILABLE_IN_ALL
GIcon * g_content_type_get_icon (const gchar *type);
GLIB_AVAILABLE_IN_2_34
GIcon * g_content_type_get_symbolic_icon (const gchar *type);
GLIB_AVAILABLE_IN_2_34
gchar * g_content_type_get_generic_icon_name (const gchar *type);
GLIB_AVAILABLE_IN_ALL
gboolean g_content_type_can_be_executable (const gchar *type);
GLIB_AVAILABLE_IN_ALL
gchar * g_content_type_from_mime_type (const gchar *mime_type);
GLIB_AVAILABLE_IN_ALL
gchar * g_content_type_guess (const gchar *filename,
const guchar *data,
gsize data_size,
gboolean *result_uncertain);
GLIB_AVAILABLE_IN_ALL
gchar ** g_content_type_guess_for_tree (GFile *root);
GLIB_AVAILABLE_IN_ALL
GList * g_content_types_get_registered (void);
/*< private >*/
#ifndef __GTK_DOC_IGNORE__
GLIB_AVAILABLE_IN_2_60
const gchar * const *g_content_type_get_mime_dirs (void);
GLIB_AVAILABLE_IN_2_60
void g_content_type_set_mime_dirs (const gchar * const *dirs);
#endif /* __GTK_DOC_IGNORE__ */
G_END_DECLS
#endif /* __G_CONTENT_TYPE_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_CONTENT_TYPE_PRIVATE_H__
#define __G_CONTENT_TYPE_PRIVATE_H__
#include "gcontenttype.h"
G_BEGIN_DECLS
gsize _g_unix_content_type_get_sniff_len (void);
char * _g_unix_content_type_unalias (const char *type);
char **_g_unix_content_type_get_parents (const char *type);
G_END_DECLS
#endif /* __G_CONTENT_TYPE_PRIVATE_H__ */
/*
* Copyright © 2015 Canonical Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_CONTEXT_SPECIFIC_GROUP_H__
#define __G_CONTEXT_SPECIFIC_GROUP_H__
#include <glib-object.h>
typedef struct
{
GHashTable *table;
GMutex lock;
GCond cond;
gboolean requested_state;
GCallback requested_func;
gboolean effective_state;
} GContextSpecificGroup;
gpointer
g_context_specific_group_get (GContextSpecificGroup *group,
GType type,
goffset context_offset,
GCallback start_func);
void
g_context_specific_group_remove (GContextSpecificGroup *group,
GMainContext *context,
gpointer instance,
GCallback stop_func);
void
g_context_specific_group_emit (GContextSpecificGroup *group,
guint signal_id);
#endif /* __G_CONTEXT_SPECIFIC_GROUP_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2009 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_CONVERTER_H__
#define __G_CONVERTER_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_CONVERTER (g_converter_get_type ())
#define G_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_CONVERTER, GConverter))
#define G_IS_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_CONVERTER))
#define G_CONVERTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_CONVERTER, GConverterIface))
/**
* GConverter:
*
* Seek object for streaming operations.
*
* Since: 2.24
**/
typedef struct _GConverterIface GConverterIface;
/**
* GConverterIface:
* @g_iface: The parent interface.
* @convert: Converts data.
* @reset: Reverts the internal state of the converter to its initial state.
*
* Provides an interface for converting data from one type
* to another type. The conversion can be stateful
* and may fail at any place.
*
* Since: 2.24
**/
struct _GConverterIface
{
GTypeInterface g_iface;
/* Virtual Table */
GConverterResult (* convert) (GConverter *converter,
const void *inbuf,
gsize inbuf_size,
void *outbuf,
gsize outbuf_size,
GConverterFlags flags,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
void (* reset) (GConverter *converter);
};
GLIB_AVAILABLE_IN_ALL
GType g_converter_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GConverterResult g_converter_convert (GConverter *converter,
const void *inbuf,
gsize inbuf_size,
void *outbuf,
gsize outbuf_size,
GConverterFlags flags,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_converter_reset (GConverter *converter);
G_END_DECLS
#endif /* __G_CONVERTER_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2009 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_CONVERTER_INPUT_STREAM_H__
#define __G_CONVERTER_INPUT_STREAM_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/gfilterinputstream.h>
#include <gio/gconverter.h>
G_BEGIN_DECLS
#define G_TYPE_CONVERTER_INPUT_STREAM (g_converter_input_stream_get_type ())
#define G_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStream))
#define G_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass))
#define G_IS_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_INPUT_STREAM))
#define G_IS_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_INPUT_STREAM))
#define G_CONVERTER_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass))
/**
* GConverterInputStream:
*
* An implementation of #GFilterInputStream that allows data
* conversion.
**/
typedef struct _GConverterInputStreamClass GConverterInputStreamClass;
typedef struct _GConverterInputStreamPrivate GConverterInputStreamPrivate;
struct _GConverterInputStream
{
GFilterInputStream parent_instance;
/*< private >*/
GConverterInputStreamPrivate *priv;
};
struct _GConverterInputStreamClass
{
GFilterInputStreamClass parent_class;
/*< private >*/
/* Padding for future expansion */
void (*_g_reserved1) (void);
void (*_g_reserved2) (void);
void (*_g_reserved3) (void);
void (*_g_reserved4) (void);
void (*_g_reserved5) (void);
};
GLIB_AVAILABLE_IN_ALL
GType g_converter_input_stream_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GInputStream *g_converter_input_stream_new (GInputStream *base_stream,
GConverter *converter);
GLIB_AVAILABLE_IN_ALL
GConverter *g_converter_input_stream_get_converter (GConverterInputStream *converter_stream);
G_END_DECLS
#endif /* __G_CONVERTER_INPUT_STREAM_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2009 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_CONVERTER_OUTPUT_STREAM_H__
#define __G_CONVERTER_OUTPUT_STREAM_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/gfilteroutputstream.h>
#include <gio/gconverter.h>
G_BEGIN_DECLS
#define G_TYPE_CONVERTER_OUTPUT_STREAM (g_converter_output_stream_get_type ())
#define G_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStream))
#define G_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass))
#define G_IS_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_OUTPUT_STREAM))
#define G_IS_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_OUTPUT_STREAM))
#define G_CONVERTER_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass))
/**
* GConverterOutputStream:
*
* An implementation of #GFilterOutputStream that allows data
* conversion.
**/
typedef struct _GConverterOutputStreamClass GConverterOutputStreamClass;
typedef struct _GConverterOutputStreamPrivate GConverterOutputStreamPrivate;
struct _GConverterOutputStream
{
GFilterOutputStream parent_instance;
/*< private >*/
GConverterOutputStreamPrivate *priv;
};
struct _GConverterOutputStreamClass
{
GFilterOutputStreamClass parent_class;
/*< private >*/
/* Padding for future expansion */
void (*_g_reserved1) (void);
void (*_g_reserved2) (void);
void (*_g_reserved3) (void);
void (*_g_reserved4) (void);
void (*_g_reserved5) (void);
};
GLIB_AVAILABLE_IN_ALL
GType g_converter_output_stream_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GOutputStream *g_converter_output_stream_new (GOutputStream *base_stream,
GConverter *converter);
GLIB_AVAILABLE_IN_ALL
GConverter *g_converter_output_stream_get_converter (GConverterOutputStream *converter_stream);
G_END_DECLS
#endif /* __G_CONVERTER_OUTPUT_STREAM_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_CREDENTIALS_H__
#define __G_CREDENTIALS_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
#ifdef G_OS_UNIX
/* To get the uid_t type */
#include <unistd.h>
#include <sys/types.h>
#endif
G_BEGIN_DECLS
#define G_TYPE_CREDENTIALS (g_credentials_get_type ())
#define G_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CREDENTIALS, GCredentials))
#define G_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CREDENTIALS, GCredentialsClass))
#define G_CREDENTIALS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CREDENTIALS, GCredentialsClass))
#define G_IS_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CREDENTIALS))
#define G_IS_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CREDENTIALS))
typedef struct _GCredentialsClass GCredentialsClass;
GLIB_AVAILABLE_IN_ALL
GType g_credentials_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GCredentials *g_credentials_new (void);
GLIB_AVAILABLE_IN_ALL
gchar *g_credentials_to_string (GCredentials *credentials);
GLIB_AVAILABLE_IN_ALL
gpointer g_credentials_get_native (GCredentials *credentials,
GCredentialsType native_type);
GLIB_AVAILABLE_IN_ALL
void g_credentials_set_native (GCredentials *credentials,
GCredentialsType native_type,
gpointer native);
GLIB_AVAILABLE_IN_ALL
gboolean g_credentials_is_same_user (GCredentials *credentials,
GCredentials *other_credentials,
GError **error);
#ifdef G_OS_UNIX
GLIB_AVAILABLE_IN_2_36
pid_t g_credentials_get_unix_pid (GCredentials *credentials,
GError **error);
GLIB_AVAILABLE_IN_ALL
uid_t g_credentials_get_unix_user (GCredentials *credentials,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_credentials_set_unix_user (GCredentials *credentials,
uid_t uid,
GError **error);
#endif
G_END_DECLS
#endif /* __G_DBUS_PROXY_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright 2013 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __G_CREDENTIALS_PRIVATE_H__
#define __G_CREDENTIALS_PRIVATE_H__
#include "gio/gcredentials.h"
#include "gio/gnetworking.h"
/*
* G_CREDENTIALS_SUPPORTED:
*
* Defined to 1 if GCredentials works.
*/
#undef G_CREDENTIALS_SUPPORTED
/*
* G_CREDENTIALS_USE_LINUX_UCRED, etc.:
*
* Defined to 1 if GCredentials uses Linux `struct ucred`, etc.
*/
#undef G_CREDENTIALS_USE_LINUX_UCRED
#undef G_CREDENTIALS_USE_FREEBSD_CMSGCRED
#undef G_CREDENTIALS_USE_NETBSD_UNPCBID
#undef G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED
#undef G_CREDENTIALS_USE_SOLARIS_UCRED
/*
* G_CREDENTIALS_NATIVE_TYPE:
*
* Defined to one of G_CREDENTIALS_TYPE_LINUX_UCRED, etc.
*/
#undef G_CREDENTIALS_NATIVE_TYPE
/*
* G_CREDENTIALS_NATIVE_SIZE:
*
* Defined to the size of the %G_CREDENTIALS_NATIVE_TYPE
*/
#undef G_CREDENTIALS_NATIVE_SIZE
/*
* G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED:
*
* Defined to 1 if we have a message-passing API in which credentials
* are attached to a particular message, such as `SCM_CREDENTIALS` on Linux
* or `SCM_CREDS` on FreeBSD.
*/
#undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED
/*
* G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED:
*
* Defined to 1 if we have a `getsockopt()`-style API in which one end of
* a socket connection can directly query the credentials of the process
* that initiated the other end, such as `getsockopt SO_PEERCRED` on Linux
* or `getpeereid()` on multiple operating systems.
*/
#undef G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED
/*
* G_CREDENTIALS_SPOOFING_SUPPORTED:
*
* Defined to 1 if privileged processes can spoof their credentials when
* using the message-passing API.
*/
#undef G_CREDENTIALS_SPOOFING_SUPPORTED
/*
* G_CREDENTIALS_PREFER_MESSAGE_PASSING:
*
* Defined to 1 if the data structure transferred by the message-passing
* API is strictly more informative than the one transferred by the
* `getsockopt()`-style API, and hence should be preferred, even for
* protocols like D-Bus that are defined in terms of the credentials of
* the (process that opened the) socket, as opposed to the credentials
* of an individual message.
*/
#undef G_CREDENTIALS_PREFER_MESSAGE_PASSING
#ifdef __linux__
#define G_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_USE_LINUX_UCRED 1
#define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_LINUX_UCRED
#define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct ucred))
#define G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED 1
#define G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_SPOOFING_SUPPORTED 1
#elif defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) /* Debian GNU/kFreeBSD */ || \
defined(__GNU__) /* GNU Hurd */ || \
defined(__DragonFly__) /* DragonFly BSD */
#define G_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_USE_FREEBSD_CMSGCRED 1
#define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED
#define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct cmsgcred))
#define G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED 1
#define G_CREDENTIALS_SPOOFING_SUPPORTED 1
/* GLib doesn't implement it yet, but FreeBSD's getsockopt()-style API
* is getpeereid(), which is not as informative as struct cmsgcred -
* it does not tell us the PID. As a result, libdbus prefers to use
* SCM_CREDS, and if we implement getpeereid() in future, we should
* do the same. */
#define G_CREDENTIALS_PREFER_MESSAGE_PASSING 1
#elif defined(__NetBSD__)
#define G_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_USE_NETBSD_UNPCBID 1
#define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_NETBSD_UNPCBID
#define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct unpcbid))
/* #undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED */
#define G_CREDENTIALS_SPOOFING_SUPPORTED 1
#elif defined(__OpenBSD__)
#define G_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED 1
#define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED
#define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct sockpeercred))
#define G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_SPOOFING_SUPPORTED 1
#elif defined(__sun__) || defined(__illumos__) || defined (__OpenSolaris_kernel__)
#include <ucred.h>
#define G_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_USE_SOLARIS_UCRED 1
#define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_SOLARIS_UCRED
#define G_CREDENTIALS_NATIVE_SIZE (ucred_size ())
#define G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED 1
#define G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED 1
#endif
#endif /* __G_CREDENTIALS_PRIVATE_H__ */
/*
* Copyright 2015 Collabora Ltd.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Philip Withnall <philip.withnall@collabora.co.uk>
*/
#ifndef __G_DATAGRAM_BASED_H__
#define __G_DATAGRAM_BASED_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DATAGRAM_BASED (g_datagram_based_get_type ())
#define G_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_DATAGRAM_BASED, GDatagramBased))
#define G_IS_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_DATAGRAM_BASED))
#define G_DATAGRAM_BASED_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
G_TYPE_DATAGRAM_BASED, \
GDatagramBasedInterface))
#define G_TYPE_IS_DATAGRAM_BASED(type) (g_type_is_a ((type), \
G_TYPE_DATAGRAM_BASED))
/**
* GDatagramBased:
*
* Interface for socket-like objects with datagram semantics.
*
* Since: 2.48
*/
typedef struct _GDatagramBasedInterface GDatagramBasedInterface;
/**
* GDatagramBasedInterface:
* @g_iface: The parent interface.
* @receive_messages: Virtual method for g_datagram_based_receive_messages().
* @send_messages: Virtual method for g_datagram_based_send_messages().
* @create_source: Virtual method for g_datagram_based_create_source().
* @condition_check: Virtual method for g_datagram_based_condition_check().
* @condition_wait: Virtual method for
* g_datagram_based_condition_wait().
*
* Provides an interface for socket-like objects which have datagram semantics,
* following the Berkeley sockets API. The interface methods are thin wrappers
* around the corresponding virtual methods, and no pre-processing of inputs is
* implemented — so implementations of this API must handle all functionality
* documented in the interface methods.
*
* Since: 2.48
*/
struct _GDatagramBasedInterface
{
GTypeInterface g_iface;
/* Virtual table */
gint (*receive_messages) (GDatagramBased *datagram_based,
GInputMessage *messages,
guint num_messages,
gint flags,
gint64 timeout,
GCancellable *cancellable,
GError **error);
gint (*send_messages) (GDatagramBased *datagram_based,
GOutputMessage *messages,
guint num_messages,
gint flags,
gint64 timeout,
GCancellable *cancellable,
GError **error);
GSource *(*create_source) (GDatagramBased *datagram_based,
GIOCondition condition,
GCancellable *cancellable);
GIOCondition (*condition_check) (GDatagramBased *datagram_based,
GIOCondition condition);
gboolean (*condition_wait) (GDatagramBased *datagram_based,
GIOCondition condition,
gint64 timeout,
GCancellable *cancellable,
GError **error);
};
GLIB_AVAILABLE_IN_2_48
GType
g_datagram_based_get_type (void);
GLIB_AVAILABLE_IN_2_48
gint
g_datagram_based_receive_messages (GDatagramBased *datagram_based,
GInputMessage *messages,
guint num_messages,
gint flags,
gint64 timeout,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_2_48
gint
g_datagram_based_send_messages (GDatagramBased *datagram_based,
GOutputMessage *messages,
guint num_messages,
gint flags,
gint64 timeout,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_2_48
GSource *
g_datagram_based_create_source (GDatagramBased *datagram_based,
GIOCondition condition,
GCancellable *cancellable);
GLIB_AVAILABLE_IN_2_48
GIOCondition
g_datagram_based_condition_check (GDatagramBased *datagram_based,
GIOCondition condition);
GLIB_AVAILABLE_IN_2_48
gboolean
g_datagram_based_condition_wait (GDatagramBased *datagram_based,
GIOCondition condition,
gint64 timeout,
GCancellable *cancellable,
GError **error);
G_END_DECLS
#endif /* __G_DATAGRAM_BASED_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef __G_DATA_OUTPUT_STREAM_H__
#define __G_DATA_OUTPUT_STREAM_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/gfilteroutputstream.h>
G_BEGIN_DECLS
#define G_TYPE_DATA_OUTPUT_STREAM (g_data_output_stream_get_type ())
#define G_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStream))
#define G_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass))
#define G_IS_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_OUTPUT_STREAM))
#define G_IS_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_OUTPUT_STREAM))
#define G_DATA_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass))
/**
* GDataOutputStream:
*
* An implementation of #GBufferedOutputStream that allows for high-level
* data manipulation of arbitrary data (including binary operations).
**/
typedef struct _GDataOutputStream GDataOutputStream;
typedef struct _GDataOutputStreamClass GDataOutputStreamClass;
typedef struct _GDataOutputStreamPrivate GDataOutputStreamPrivate;
struct _GDataOutputStream
{
GFilterOutputStream parent_instance;
/*< private >*/
GDataOutputStreamPrivate *priv;
};
struct _GDataOutputStreamClass
{
GFilterOutputStreamClass parent_class;
/*< private >*/
/* Padding for future expansion */
void (*_g_reserved1) (void);
void (*_g_reserved2) (void);
void (*_g_reserved3) (void);
void (*_g_reserved4) (void);
void (*_g_reserved5) (void);
};
GLIB_AVAILABLE_IN_ALL
GType g_data_output_stream_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDataOutputStream * g_data_output_stream_new (GOutputStream *base_stream);
GLIB_AVAILABLE_IN_ALL
void g_data_output_stream_set_byte_order (GDataOutputStream *stream,
GDataStreamByteOrder order);
GLIB_AVAILABLE_IN_ALL
GDataStreamByteOrder g_data_output_stream_get_byte_order (GDataOutputStream *stream);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_byte (GDataOutputStream *stream,
guchar data,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_int16 (GDataOutputStream *stream,
gint16 data,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_uint16 (GDataOutputStream *stream,
guint16 data,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_int32 (GDataOutputStream *stream,
gint32 data,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_uint32 (GDataOutputStream *stream,
guint32 data,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_int64 (GDataOutputStream *stream,
gint64 data,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_uint64 (GDataOutputStream *stream,
guint64 data,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_data_output_stream_put_string (GDataOutputStream *stream,
const char *str,
GCancellable *cancellable,
GError **error);
G_END_DECLS
#endif /* __G_DATA_OUTPUT_STREAM_H__ */
/*
* Copyright © 2010 Codethink Limited
* Copyright © 2011 Canonical Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_DBUS_ACTION_GROUP_PRIVATE_H__
#define __G_DBUS_ACTION_GROUP_PRIVATE_H__
#include "gdbusactiongroup.h"
G_BEGIN_DECLS
gboolean
g_dbus_action_group_sync (GDBusActionGroup *group,
GCancellable *cancellable,
GError **error);
G_END_DECLS
#endif
/*
* Copyright © 2010 Codethink Limited
* Copyright © 2011 Canonical Limited
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_DBUS_ACTION_GROUP_H__
#define __G_DBUS_ACTION_GROUP_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include "giotypes.h"
G_BEGIN_DECLS
#define G_TYPE_DBUS_ACTION_GROUP (g_dbus_action_group_get_type ())
#define G_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroup))
#define G_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass))
#define G_IS_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_DBUS_ACTION_GROUP))
#define G_IS_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
G_TYPE_DBUS_ACTION_GROUP))
#define G_DBUS_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass))
GLIB_AVAILABLE_IN_ALL
GType g_dbus_action_group_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
GDBusActionGroup * g_dbus_action_group_get (GDBusConnection *connection,
const gchar *bus_name,
const gchar *object_path);
G_END_DECLS
#endif /* __G_DBUS_ACTION_GROUP_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_ADDRESS_H__
#define __G_DBUS_ADDRESS_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
GLIB_AVAILABLE_IN_2_36
gchar *g_dbus_address_escape_value (const gchar *string);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_is_address (const gchar *string);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_is_supported_address (const gchar *string,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_dbus_address_get_stream (const gchar *address,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
GIOStream *g_dbus_address_get_stream_finish (GAsyncResult *res,
gchar **out_guid,
GError **error);
GLIB_AVAILABLE_IN_ALL
GIOStream *g_dbus_address_get_stream_sync (const gchar *address,
gchar **out_guid,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
gchar *g_dbus_address_get_for_bus_sync (GBusType bus_type,
GCancellable *cancellable,
GError **error);
G_END_DECLS
#endif /* __G_DBUS_ADDRESS_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_AUTH_H__
#define __G_DBUS_AUTH_H__
#if !defined (GIO_COMPILATION)
#error "gdbusauth.h is a private header file."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_AUTH (_g_dbus_auth_get_type ())
#define G_DBUS_AUTH(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH, GDBusAuth))
#define G_DBUS_AUTH_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_AUTH, GDBusAuthClass))
#define G_DBUS_AUTH_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_AUTH, GDBusAuthClass))
#define G_IS_DBUS_AUTH(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH))
#define G_IS_DBUS_AUTH_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_AUTH))
typedef struct _GDBusAuth GDBusAuth;
typedef struct _GDBusAuthClass GDBusAuthClass;
typedef struct _GDBusAuthPrivate GDBusAuthPrivate;
struct _GDBusAuthClass
{
/*< private >*/
GObjectClass parent_class;
};
struct _GDBusAuth
{
GObject parent_instance;
GDBusAuthPrivate *priv;
};
GType _g_dbus_auth_get_type (void) G_GNUC_CONST;
GDBusAuth *_g_dbus_auth_new (GIOStream *stream);
/* TODO: need a way to set allowed authentication mechanisms */
/* TODO: need a way to convey credentials etc. */
/* TODO: need a way to convey negotiated features (e.g. returning flags from e.g. GDBusConnectionFeatures) */
/* TODO: need to expose encode()/decode() from the AuthMechanism (and whether it is needed at all) */
gboolean _g_dbus_auth_run_server (GDBusAuth *auth,
GDBusAuthObserver *observer,
const gchar *guid,
gboolean allow_anonymous,
GDBusCapabilityFlags offered_capabilities,
GDBusCapabilityFlags *out_negotiated_capabilities,
GCredentials **out_received_credentials,
GCancellable *cancellable,
GError **error);
gchar *_g_dbus_auth_run_client (GDBusAuth *auth,
GDBusAuthObserver *observer,
GDBusCapabilityFlags offered_capabilities,
GDBusCapabilityFlags *out_negotiated_capabilities,
GCancellable *cancellable,
GError **error);
G_END_DECLS
#endif /* __G_DBUS_AUTH_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_AUTH_MECHANISM_H__
#define __G_DBUS_AUTH_MECHANISM_H__
#if !defined (GIO_COMPILATION)
#error "gdbusauthmechanism.h is a private header file."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_AUTH_MECHANISM (_g_dbus_auth_mechanism_get_type ())
#define G_DBUS_AUTH_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_MECHANISM, GDBusAuthMechanism))
#define G_DBUS_AUTH_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_AUTH_MECHANISM, GDBusAuthMechanismClass))
#define G_DBUS_AUTH_MECHANISM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_AUTH_MECHANISM, GDBusAuthMechanismClass))
#define G_IS_DBUS_AUTH_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_MECHANISM))
#define G_IS_DBUS_AUTH_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_AUTH_MECHANISM))
typedef struct _GDBusAuthMechanism GDBusAuthMechanism;
typedef struct _GDBusAuthMechanismClass GDBusAuthMechanismClass;
typedef struct _GDBusAuthMechanismPrivate GDBusAuthMechanismPrivate;
typedef enum {
G_DBUS_AUTH_MECHANISM_STATE_INVALID,
G_DBUS_AUTH_MECHANISM_STATE_WAITING_FOR_DATA,
G_DBUS_AUTH_MECHANISM_STATE_HAVE_DATA_TO_SEND,
G_DBUS_AUTH_MECHANISM_STATE_REJECTED,
G_DBUS_AUTH_MECHANISM_STATE_ACCEPTED,
} GDBusAuthMechanismState;
struct _GDBusAuthMechanismClass
{
/*< private >*/
GObjectClass parent_class;
/*< public >*/
/* VTable */
/* TODO: server_initiate and client_initiate probably needs to have a
* GCredentials parameter...
*/
gint (*get_priority) (void);
const gchar *(*get_name) (void);
/* functions shared by server/client */
gboolean (*is_supported) (GDBusAuthMechanism *mechanism);
gchar *(*encode_data) (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len);
gchar *(*decode_data) (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len);
/* functions for server-side authentication */
GDBusAuthMechanismState (*server_get_state) (GDBusAuthMechanism *mechanism);
void (*server_initiate) (GDBusAuthMechanism *mechanism,
const gchar *initial_response,
gsize initial_response_len);
void (*server_data_receive) (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len);
gchar *(*server_data_send) (GDBusAuthMechanism *mechanism,
gsize *out_data_len);
gchar *(*server_get_reject_reason) (GDBusAuthMechanism *mechanism);
void (*server_shutdown) (GDBusAuthMechanism *mechanism);
/* functions for client-side authentication */
GDBusAuthMechanismState (*client_get_state) (GDBusAuthMechanism *mechanism);
gchar *(*client_initiate) (GDBusAuthMechanism *mechanism,
gsize *out_initial_response_len);
void (*client_data_receive) (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len);
gchar *(*client_data_send) (GDBusAuthMechanism *mechanism,
gsize *out_data_len);
void (*client_shutdown) (GDBusAuthMechanism *mechanism);
};
struct _GDBusAuthMechanism
{
GObject parent_instance;
GDBusAuthMechanismPrivate *priv;
};
GType _g_dbus_auth_mechanism_get_type (void) G_GNUC_CONST;
gint _g_dbus_auth_mechanism_get_priority (GType mechanism_type);
const gchar *_g_dbus_auth_mechanism_get_name (GType mechanism_type);
GIOStream *_g_dbus_auth_mechanism_get_stream (GDBusAuthMechanism *mechanism);
GCredentials *_g_dbus_auth_mechanism_get_credentials (GDBusAuthMechanism *mechanism);
gboolean _g_dbus_auth_mechanism_is_supported (GDBusAuthMechanism *mechanism);
gchar *_g_dbus_auth_mechanism_encode_data (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len);
gchar *_g_dbus_auth_mechanism_decode_data (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len);
GDBusAuthMechanismState _g_dbus_auth_mechanism_server_get_state (GDBusAuthMechanism *mechanism);
void _g_dbus_auth_mechanism_server_initiate (GDBusAuthMechanism *mechanism,
const gchar *initial_response,
gsize initial_response_len);
void _g_dbus_auth_mechanism_server_data_receive (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len);
gchar *_g_dbus_auth_mechanism_server_data_send (GDBusAuthMechanism *mechanism,
gsize *out_data_len);
gchar *_g_dbus_auth_mechanism_server_get_reject_reason (GDBusAuthMechanism *mechanism);
void _g_dbus_auth_mechanism_server_shutdown (GDBusAuthMechanism *mechanism);
GDBusAuthMechanismState _g_dbus_auth_mechanism_client_get_state (GDBusAuthMechanism *mechanism);
gchar *_g_dbus_auth_mechanism_client_initiate (GDBusAuthMechanism *mechanism,
gsize *out_initial_response_len);
void _g_dbus_auth_mechanism_client_data_receive (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len);
gchar *_g_dbus_auth_mechanism_client_data_send (GDBusAuthMechanism *mechanism,
gsize *out_data_len);
void _g_dbus_auth_mechanism_client_shutdown (GDBusAuthMechanism *mechanism);
G_END_DECLS
#endif /* __G_DBUS_AUTH_MECHANISM_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_AUTH_MECHANISM_ANON_H__
#define __G_DBUS_AUTH_MECHANISM_ANON_H__
#if !defined (GIO_COMPILATION)
#error "gdbusauthmechanismanon.h is a private header file."
#endif
#include <gio/giotypes.h>
#include <gio/gdbusauthmechanism.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_AUTH_MECHANISM_ANON (_g_dbus_auth_mechanism_anon_get_type ())
#define G_DBUS_AUTH_MECHANISM_ANON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_MECHANISM_ANON, GDBusAuthMechanismAnon))
#define G_DBUS_AUTH_MECHANISM_ANON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_AUTH_MECHANISM_ANON, GDBusAuthMechanismAnonClass))
#define G_DBUS_AUTH_MECHANISM_ANON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_AUTH_MECHANISM_ANON, GDBusAuthMechanismAnonClass))
#define G_IS_DBUS_AUTH_MECHANISM_ANON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_MECHANISM_ANON))
#define G_IS_DBUS_AUTH_MECHANISM_ANON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_AUTH_MECHANISM_ANON))
typedef struct _GDBusAuthMechanismAnon GDBusAuthMechanismAnon;
typedef struct _GDBusAuthMechanismAnonClass GDBusAuthMechanismAnonClass;
typedef struct _GDBusAuthMechanismAnonPrivate GDBusAuthMechanismAnonPrivate;
struct _GDBusAuthMechanismAnonClass
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
};
struct _GDBusAuthMechanismAnon
{
GDBusAuthMechanism parent_instance;
GDBusAuthMechanismAnonPrivate *priv;
};
GType _g_dbus_auth_mechanism_anon_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __G_DBUS_AUTH_MECHANISM_ANON_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_AUTH_MECHANISM_EXTERNAL_H__
#define __G_DBUS_AUTH_MECHANISM_EXTERNAL_H__
#if !defined (GIO_COMPILATION)
#error "gdbusauthmechanismexternal.h is a private header file."
#endif
#include <gio/giotypes.h>
#include <gio/gdbusauthmechanism.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_AUTH_MECHANISM_EXTERNAL (_g_dbus_auth_mechanism_external_get_type ())
#define G_DBUS_AUTH_MECHANISM_EXTERNAL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_MECHANISM_EXTERNAL, GDBusAuthMechanismExternal))
#define G_DBUS_AUTH_MECHANISM_EXTERNAL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_AUTH_MECHANISM_EXTERNAL, GDBusAuthMechanismExternalClass))
#define G_DBUS_AUTH_MECHANISM_EXTERNAL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_AUTH_MECHANISM_EXTERNAL, GDBusAuthMechanismExternalClass))
#define G_IS_DBUS_AUTH_MECHANISM_EXTERNAL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_MECHANISM_EXTERNAL))
#define G_IS_DBUS_AUTH_MECHANISM_EXTERNAL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_AUTH_MECHANISM_EXTERNAL))
typedef struct _GDBusAuthMechanismExternal GDBusAuthMechanismExternal;
typedef struct _GDBusAuthMechanismExternalClass GDBusAuthMechanismExternalClass;
typedef struct _GDBusAuthMechanismExternalPrivate GDBusAuthMechanismExternalPrivate;
struct _GDBusAuthMechanismExternalClass
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
};
struct _GDBusAuthMechanismExternal
{
GDBusAuthMechanism parent_instance;
GDBusAuthMechanismExternalPrivate *priv;
};
GType _g_dbus_auth_mechanism_external_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __G_DBUS_AUTH_MECHANISM_EXTERNAL_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_AUTH_MECHANISM_SHA1_H__
#define __G_DBUS_AUTH_MECHANISM_SHA1_H__
#if !defined (GIO_COMPILATION)
#error "gdbusauthmechanismsha1.h is a private header file."
#endif
#include <gio/giotypes.h>
#include <gio/gdbusauthmechanism.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_AUTH_MECHANISM_SHA1 (_g_dbus_auth_mechanism_sha1_get_type ())
#define G_DBUS_AUTH_MECHANISM_SHA1(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_MECHANISM_SHA1, GDBusAuthMechanismSha1))
#define G_DBUS_AUTH_MECHANISM_SHA1_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_AUTH_MECHANISM_SHA1, GDBusAuthMechanismSha1Class))
#define G_DBUS_AUTH_MECHANISM_SHA1_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_AUTH_MECHANISM_SHA1, GDBusAuthMechanismSha1Class))
#define G_IS_DBUS_AUTH_MECHANISM_SHA1(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_MECHANISM_SHA1))
#define G_IS_DBUS_AUTH_MECHANISM_SHA1_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_AUTH_MECHANISM_SHA1))
typedef struct _GDBusAuthMechanismSha1 GDBusAuthMechanismSha1;
typedef struct _GDBusAuthMechanismSha1Class GDBusAuthMechanismSha1Class;
typedef struct _GDBusAuthMechanismSha1Private GDBusAuthMechanismSha1Private;
struct _GDBusAuthMechanismSha1Class
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
};
struct _GDBusAuthMechanismSha1
{
GDBusAuthMechanism parent_instance;
GDBusAuthMechanismSha1Private *priv;
};
GType _g_dbus_auth_mechanism_sha1_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __G_DBUS_AUTH_MECHANISM_SHA1_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_AUTH_OBSERVER_H__
#define __G_DBUS_AUTH_OBSERVER_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_AUTH_OBSERVER (g_dbus_auth_observer_get_type ())
#define G_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_OBSERVER, GDBusAuthObserver))
#define G_IS_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_OBSERVER))
GLIB_AVAILABLE_IN_ALL
GType g_dbus_auth_observer_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDBusAuthObserver *g_dbus_auth_observer_new (void);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_auth_observer_authorize_authenticated_peer (GDBusAuthObserver *observer,
GIOStream *stream,
GCredentials *credentials);
GLIB_AVAILABLE_IN_2_34
gboolean g_dbus_auth_observer_allow_mechanism (GDBusAuthObserver *observer,
const gchar *mechanism);
G_END_DECLS
#endif /* _G_DBUS_AUTH_OBSERVER_H__ */
#include <gio/gio.h>
#define G_TYPE_DBUS_DAEMON (_g_dbus_daemon_get_type ())
#define G_DBUS_DAEMON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_DAEMON, GDBusDaemon))
#define G_DBUS_DAEMON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_DBUS_DAEMON, GDBusDaemonClass))
#define G_DBUS_DAEMON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_DAEMON, GDBusDaemonClass))
#define G_IS_DBUS_DAEMON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_DAEMON))
#define G_IS_DBUS_DAEMON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_DAEMON))
typedef struct _GDBusDaemon GDBusDaemon;
typedef struct _GDBusDaemonClass GDBusDaemonClass;
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusDaemon, g_object_unref)
GType _g_dbus_daemon_get_type (void) G_GNUC_CONST;
GDBusDaemon *_g_dbus_daemon_new (const char *address,
GCancellable *cancellable,
GError **error);
const char *_g_dbus_daemon_get_address (GDBusDaemon *daemon);
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_ERROR_H__
#define __G_DBUS_ERROR_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
/**
* G_DBUS_ERROR:
*
* Error domain for errors generated by a remote message bus. Errors
* in this domain will be from the #GDBusError enumeration. See
* #GError for more information on error domains.
*
* Note that this error domain is intended only for
* returning errors from a remote message bus process. Errors
* generated locally in-process by e.g. #GDBusConnection should use the
* %G_IO_ERROR domain.
*
* Since: 2.26
*/
#define G_DBUS_ERROR g_dbus_error_quark()
GLIB_AVAILABLE_IN_ALL
GQuark g_dbus_error_quark (void);
/* Used by applications to check, get and strip the D-Bus error name */
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_error_is_remote_error (const GError *error);
GLIB_AVAILABLE_IN_ALL
gchar *g_dbus_error_get_remote_error (const GError *error);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_error_strip_remote_error (GError *error);
/**
* GDBusErrorEntry:
* @error_code: An error code.
* @dbus_error_name: The D-Bus error name to associate with @error_code.
*
* Struct used in g_dbus_error_register_error_domain().
*
* Since: 2.26
*/
struct _GDBusErrorEntry
{
gint error_code;
const gchar *dbus_error_name;
};
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_error_register_error (GQuark error_domain,
gint error_code,
const gchar *dbus_error_name);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_error_unregister_error (GQuark error_domain,
gint error_code,
const gchar *dbus_error_name);
GLIB_AVAILABLE_IN_ALL
void g_dbus_error_register_error_domain (const gchar *error_domain_quark_name,
volatile gsize *quark_volatile,
const GDBusErrorEntry *entries,
guint num_entries);
/* Only used by object mappings to map back and forth to GError */
GLIB_AVAILABLE_IN_ALL
GError *g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name,
const gchar *dbus_error_message);
GLIB_AVAILABLE_IN_ALL
void g_dbus_error_set_dbus_error (GError **error,
const gchar *dbus_error_name,
const gchar *dbus_error_message,
const gchar *format,
...) G_GNUC_PRINTF(4, 5);
GLIB_AVAILABLE_IN_ALL
void g_dbus_error_set_dbus_error_valist (GError **error,
const gchar *dbus_error_name,
const gchar *dbus_error_message,
const gchar *format,
va_list var_args) G_GNUC_PRINTF(4, 0);
GLIB_AVAILABLE_IN_ALL
gchar *g_dbus_error_encode_gerror (const GError *error);
G_END_DECLS
#endif /* __G_DBUS_ERROR_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_INTERFACE_H__
#define __G_DBUS_INTERFACE_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_INTERFACE (g_dbus_interface_get_type())
#define G_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE, GDBusInterface))
#define G_IS_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE))
#define G_DBUS_INTERFACE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_INTERFACE, GDBusInterfaceIface))
/**
* GDBusInterface:
*
* Base type for D-Bus interfaces.
*
* Since: 2.30
*/
typedef struct _GDBusInterfaceIface GDBusInterfaceIface;
/**
* GDBusInterfaceIface:
* @parent_iface: The parent interface.
* @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
* @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
* @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
* @dup_object: Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.
*
* Base type for D-Bus interfaces.
*
* Since: 2.30
*/
struct _GDBusInterfaceIface
{
GTypeInterface parent_iface;
/* Virtual Functions */
GDBusInterfaceInfo *(*get_info) (GDBusInterface *interface_);
GDBusObject *(*get_object) (GDBusInterface *interface_);
void (*set_object) (GDBusInterface *interface_,
GDBusObject *object);
GDBusObject *(*dup_object) (GDBusInterface *interface_);
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_interface_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDBusInterfaceInfo *g_dbus_interface_get_info (GDBusInterface *interface_);
GLIB_AVAILABLE_IN_ALL
GDBusObject *g_dbus_interface_get_object (GDBusInterface *interface_);
GLIB_AVAILABLE_IN_ALL
void g_dbus_interface_set_object (GDBusInterface *interface_,
GDBusObject *object);
GLIB_AVAILABLE_IN_2_32
GDBusObject *g_dbus_interface_dup_object (GDBusInterface *interface_);
G_END_DECLS
#endif /* __G_DBUS_INTERFACE_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_INTERFACE_SKELETON_H__
#define __G_DBUS_INTERFACE_SKELETON_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_INTERFACE_SKELETON (g_dbus_interface_skeleton_get_type ())
#define G_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeleton))
#define G_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass))
#define G_DBUS_INTERFACE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass))
#define G_IS_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE_SKELETON))
#define G_IS_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_INTERFACE_SKELETON))
typedef struct _GDBusInterfaceSkeletonClass GDBusInterfaceSkeletonClass;
typedef struct _GDBusInterfaceSkeletonPrivate GDBusInterfaceSkeletonPrivate;
/**
* GDBusInterfaceSkeleton:
*
* The #GDBusInterfaceSkeleton structure contains private data and should
* only be accessed using the provided API.
*
* Since: 2.30
*/
struct _GDBusInterfaceSkeleton
{
/*< private >*/
GObject parent_instance;
GDBusInterfaceSkeletonPrivate *priv;
};
/**
* GDBusInterfaceSkeletonClass:
* @parent_class: The parent class.
* @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
* @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
* @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
* @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
* @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
*
* Class structure for #GDBusInterfaceSkeleton.
*
* Since: 2.30
*/
struct _GDBusInterfaceSkeletonClass
{
GObjectClass parent_class;
/* Virtual Functions */
GDBusInterfaceInfo *(*get_info) (GDBusInterfaceSkeleton *interface_);
GDBusInterfaceVTable *(*get_vtable) (GDBusInterfaceSkeleton *interface_);
GVariant *(*get_properties) (GDBusInterfaceSkeleton *interface_);
void (*flush) (GDBusInterfaceSkeleton *interface_);
/*< private >*/
gpointer vfunc_padding[8];
/*< public >*/
/* Signals */
gboolean (*g_authorize_method) (GDBusInterfaceSkeleton *interface_,
GDBusMethodInvocation *invocation);
/*< private >*/
gpointer signal_padding[8];
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_interface_skeleton_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDBusInterfaceSkeletonFlags g_dbus_interface_skeleton_get_flags (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
void g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_,
GDBusInterfaceSkeletonFlags flags);
GLIB_AVAILABLE_IN_ALL
GDBusInterfaceInfo *g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
GDBusInterfaceVTable *g_dbus_interface_skeleton_get_vtable (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
GVariant *g_dbus_interface_skeleton_get_properties (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
void g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_,
GDBusConnection *connection,
const gchar *object_path,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
void g_dbus_interface_skeleton_unexport_from_connection (GDBusInterfaceSkeleton *interface_,
GDBusConnection *connection);
GLIB_AVAILABLE_IN_ALL
GDBusConnection *g_dbus_interface_skeleton_get_connection (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
GList *g_dbus_interface_skeleton_get_connections (GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_interface_skeleton_has_connection (GDBusInterfaceSkeleton *interface_,
GDBusConnection *connection);
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_interface_skeleton_get_object_path (GDBusInterfaceSkeleton *interface_);
G_END_DECLS
#endif /* __G_DBUS_INTERFACE_SKELETON_H */
/*
* Copyright © 2011 Canonical Ltd.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_DBUS_MENU_MODEL_H__
#define __G_DBUS_MENU_MODEL_H__
#include <gio/gdbusconnection.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_MENU_MODEL (g_dbus_menu_model_get_type ())
#define G_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_DBUS_MENU_MODEL, GDBusMenuModel))
#define G_IS_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_DBUS_MENU_MODEL))
typedef struct _GDBusMenuModel GDBusMenuModel;
GLIB_AVAILABLE_IN_ALL
GType g_dbus_menu_model_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDBusMenuModel * g_dbus_menu_model_get (GDBusConnection *connection,
const gchar *bus_name,
const gchar *object_path);
G_END_DECLS
#endif /* __G_DBUS_MENU_MODEL_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_METHOD_INVOCATION_H__
#define __G_DBUS_METHOD_INVOCATION_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_METHOD_INVOCATION (g_dbus_method_invocation_get_type ())
#define G_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_METHOD_INVOCATION, GDBusMethodInvocation))
#define G_IS_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_METHOD_INVOCATION))
GLIB_AVAILABLE_IN_ALL
GType g_dbus_method_invocation_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_method_invocation_get_sender (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_method_invocation_get_object_path (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_method_invocation_get_interface_name (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_method_invocation_get_method_name (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
const GDBusMethodInfo *g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_2_38
const GDBusPropertyInfo *g_dbus_method_invocation_get_property_info (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
GDBusMessage *g_dbus_method_invocation_get_message (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
GVariant *g_dbus_method_invocation_get_parameters (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
gpointer g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_return_value (GDBusMethodInvocation *invocation,
GVariant *parameters);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_return_value_with_unix_fd_list (GDBusMethodInvocation *invocation,
GVariant *parameters,
GUnixFDList *fd_list);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_return_error (GDBusMethodInvocation *invocation,
GQuark domain,
gint code,
const gchar *format,
...) G_GNUC_PRINTF(4, 5);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_return_error_valist (GDBusMethodInvocation *invocation,
GQuark domain,
gint code,
const gchar *format,
va_list var_args)
G_GNUC_PRINTF(4, 0);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_return_error_literal (GDBusMethodInvocation *invocation,
GQuark domain,
gint code,
const gchar *message);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_return_gerror (GDBusMethodInvocation *invocation,
const GError *error);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation,
GError *error);
GLIB_AVAILABLE_IN_ALL
void g_dbus_method_invocation_return_dbus_error (GDBusMethodInvocation *invocation,
const gchar *error_name,
const gchar *error_message);
G_END_DECLS
#endif /* __G_DBUS_METHOD_INVOCATION_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_NAME_OWNING_H__
#define __G_DBUS_NAME_OWNING_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
/**
* GBusAcquiredCallback:
* @connection: The #GDBusConnection to a message bus.
* @name: The name that is requested to be owned.
* @user_data: User data passed to g_bus_own_name().
*
* Invoked when a connection to a message bus has been obtained.
*
* Since: 2.26
*/
typedef void (*GBusAcquiredCallback) (GDBusConnection *connection,
const gchar *name,
gpointer user_data);
/**
* GBusNameAcquiredCallback:
* @connection: The #GDBusConnection on which to acquired the name.
* @name: The name being owned.
* @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
*
* Invoked when the name is acquired.
*
* Since: 2.26
*/
typedef void (*GBusNameAcquiredCallback) (GDBusConnection *connection,
const gchar *name,
gpointer user_data);
/**
* GBusNameLostCallback:
* @connection: The #GDBusConnection on which to acquire the name or %NULL if
* the connection was disconnected.
* @name: The name being owned.
* @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
*
* Invoked when the name is lost or @connection has been closed.
*
* Since: 2.26
*/
typedef void (*GBusNameLostCallback) (GDBusConnection *connection,
const gchar *name,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
guint g_bus_own_name (GBusType bus_type,
const gchar *name,
GBusNameOwnerFlags flags,
GBusAcquiredCallback bus_acquired_handler,
GBusNameAcquiredCallback name_acquired_handler,
GBusNameLostCallback name_lost_handler,
gpointer user_data,
GDestroyNotify user_data_free_func);
GLIB_AVAILABLE_IN_ALL
guint g_bus_own_name_on_connection (GDBusConnection *connection,
const gchar *name,
GBusNameOwnerFlags flags,
GBusNameAcquiredCallback name_acquired_handler,
GBusNameLostCallback name_lost_handler,
gpointer user_data,
GDestroyNotify user_data_free_func);
GLIB_AVAILABLE_IN_ALL
guint g_bus_own_name_with_closures (GBusType bus_type,
const gchar *name,
GBusNameOwnerFlags flags,
GClosure *bus_acquired_closure,
GClosure *name_acquired_closure,
GClosure *name_lost_closure);
GLIB_AVAILABLE_IN_ALL
guint g_bus_own_name_on_connection_with_closures (
GDBusConnection *connection,
const gchar *name,
GBusNameOwnerFlags flags,
GClosure *name_acquired_closure,
GClosure *name_lost_closure);
GLIB_AVAILABLE_IN_ALL
void g_bus_unown_name (guint owner_id);
G_END_DECLS
#endif /* __G_DBUS_NAME_OWNING_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_NAME_WATCHING_H__
#define __G_DBUS_NAME_WATCHING_H__
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#include <gio/giotypes.h>
G_BEGIN_DECLS
/**
* GBusNameAppearedCallback:
* @connection: The #GDBusConnection the name is being watched on.
* @name: The name being watched.
* @name_owner: Unique name of the owner of the name being watched.
* @user_data: User data passed to g_bus_watch_name().
*
* Invoked when the name being watched is known to have to have an owner.
*
* Since: 2.26
*/
typedef void (*GBusNameAppearedCallback) (GDBusConnection *connection,
const gchar *name,
const gchar *name_owner,
gpointer user_data);
/**
* GBusNameVanishedCallback:
* @connection: The #GDBusConnection the name is being watched on, or
* %NULL.
* @name: The name being watched.
* @user_data: User data passed to g_bus_watch_name().
*
* Invoked when the name being watched is known not to have to have an owner.
*
* This is also invoked when the #GDBusConnection on which the watch was
* established has been closed. In that case, @connection will be
* %NULL.
*
* Since: 2.26
*/
typedef void (*GBusNameVanishedCallback) (GDBusConnection *connection,
const gchar *name,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
guint g_bus_watch_name (GBusType bus_type,
const gchar *name,
GBusNameWatcherFlags flags,
GBusNameAppearedCallback name_appeared_handler,
GBusNameVanishedCallback name_vanished_handler,
gpointer user_data,
GDestroyNotify user_data_free_func);
GLIB_AVAILABLE_IN_ALL
guint g_bus_watch_name_on_connection (GDBusConnection *connection,
const gchar *name,
GBusNameWatcherFlags flags,
GBusNameAppearedCallback name_appeared_handler,
GBusNameVanishedCallback name_vanished_handler,
gpointer user_data,
GDestroyNotify user_data_free_func);
GLIB_AVAILABLE_IN_ALL
guint g_bus_watch_name_with_closures (GBusType bus_type,
const gchar *name,
GBusNameWatcherFlags flags,
GClosure *name_appeared_closure,
GClosure *name_vanished_closure);
GLIB_AVAILABLE_IN_ALL
guint g_bus_watch_name_on_connection_with_closures (
GDBusConnection *connection,
const gchar *name,
GBusNameWatcherFlags flags,
GClosure *name_appeared_closure,
GClosure *name_vanished_closure);
GLIB_AVAILABLE_IN_ALL
void g_bus_unwatch_name (guint watcher_id);
G_END_DECLS
#endif /* __G_DBUS_NAME_WATCHING_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_OBJECT_H__
#define __G_DBUS_OBJECT_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_OBJECT (g_dbus_object_get_type())
#define G_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT, GDBusObject))
#define G_IS_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT))
#define G_DBUS_OBJECT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT, GDBusObjectIface))
typedef struct _GDBusObjectIface GDBusObjectIface;
/**
* GDBusObjectIface:
* @parent_iface: The parent interface.
* @get_object_path: Returns the object path. See g_dbus_object_get_object_path().
* @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces().
* @get_interface: Returns an interface by name. See g_dbus_object_get_interface().
* @interface_added: Signal handler for the #GDBusObject::interface-added signal.
* @interface_removed: Signal handler for the #GDBusObject::interface-removed signal.
*
* Base object type for D-Bus objects.
*
* Since: 2.30
*/
struct _GDBusObjectIface
{
GTypeInterface parent_iface;
/* Virtual Functions */
const gchar *(*get_object_path) (GDBusObject *object);
GList *(*get_interfaces) (GDBusObject *object);
GDBusInterface *(*get_interface) (GDBusObject *object,
const gchar *interface_name);
/* Signals */
void (*interface_added) (GDBusObject *object,
GDBusInterface *interface_);
void (*interface_removed) (GDBusObject *object,
GDBusInterface *interface_);
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_object_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_object_get_object_path (GDBusObject *object);
GLIB_AVAILABLE_IN_ALL
GList *g_dbus_object_get_interfaces (GDBusObject *object);
GLIB_AVAILABLE_IN_ALL
GDBusInterface *g_dbus_object_get_interface (GDBusObject *object,
const gchar *interface_name);
G_END_DECLS
#endif /* __G_DBUS_OBJECT_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_OBJECT_MANAGER_H__
#define __G_DBUS_OBJECT_MANAGER_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_OBJECT_MANAGER (g_dbus_object_manager_get_type())
#define G_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManager))
#define G_IS_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER))
#define G_DBUS_OBJECT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface))
typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface;
/**
* GDBusObjectManagerIface:
* @parent_iface: The parent interface.
* @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
* @get_objects: Virtual function for g_dbus_object_manager_get_objects().
* @get_object: Virtual function for g_dbus_object_manager_get_object().
* @get_interface: Virtual function for g_dbus_object_manager_get_interface().
* @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
* @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
* @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
* @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
*
* Base type for D-Bus object managers.
*
* Since: 2.30
*/
struct _GDBusObjectManagerIface
{
GTypeInterface parent_iface;
/* Virtual Functions */
const gchar *(*get_object_path) (GDBusObjectManager *manager);
GList *(*get_objects) (GDBusObjectManager *manager);
GDBusObject *(*get_object) (GDBusObjectManager *manager,
const gchar *object_path);
GDBusInterface *(*get_interface) (GDBusObjectManager *manager,
const gchar *object_path,
const gchar *interface_name);
/* Signals */
void (*object_added) (GDBusObjectManager *manager,
GDBusObject *object);
void (*object_removed) (GDBusObjectManager *manager,
GDBusObject *object);
void (*interface_added) (GDBusObjectManager *manager,
GDBusObject *object,
GDBusInterface *interface_);
void (*interface_removed) (GDBusObjectManager *manager,
GDBusObject *object,
GDBusInterface *interface_);
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_object_manager_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_object_manager_get_object_path (GDBusObjectManager *manager);
GLIB_AVAILABLE_IN_ALL
GList *g_dbus_object_manager_get_objects (GDBusObjectManager *manager);
GLIB_AVAILABLE_IN_ALL
GDBusObject *g_dbus_object_manager_get_object (GDBusObjectManager *manager,
const gchar *object_path);
GLIB_AVAILABLE_IN_ALL
GDBusInterface *g_dbus_object_manager_get_interface (GDBusObjectManager *manager,
const gchar *object_path,
const gchar *interface_name);
G_END_DECLS
#endif /* __G_DBUS_OBJECT_MANAGER_H__ */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_OBJECT_MANAGER_CLIENT_H__
#define __G_DBUS_OBJECT_MANAGER_CLIENT_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT (g_dbus_object_manager_client_get_type ())
#define G_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClient))
#define G_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass))
#define G_DBUS_OBJECT_MANAGER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass))
#define G_IS_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT))
#define G_IS_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT))
typedef struct _GDBusObjectManagerClientClass GDBusObjectManagerClientClass;
typedef struct _GDBusObjectManagerClientPrivate GDBusObjectManagerClientPrivate;
/**
* GDBusObjectManagerClient:
*
* The #GDBusObjectManagerClient structure contains private data and should
* only be accessed using the provided API.
*
* Since: 2.30
*/
struct _GDBusObjectManagerClient
{
/*< private >*/
GObject parent_instance;
GDBusObjectManagerClientPrivate *priv;
};
/**
* GDBusObjectManagerClientClass:
* @parent_class: The parent class.
* @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
* @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
*
* Class structure for #GDBusObjectManagerClient.
*
* Since: 2.30
*/
struct _GDBusObjectManagerClientClass
{
GObjectClass parent_class;
/* signals */
void (*interface_proxy_signal) (GDBusObjectManagerClient *manager,
GDBusObjectProxy *object_proxy,
GDBusProxy *interface_proxy,
const gchar *sender_name,
const gchar *signal_name,
GVariant *parameters);
void (*interface_proxy_properties_changed) (GDBusObjectManagerClient *manager,
GDBusObjectProxy *object_proxy,
GDBusProxy *interface_proxy,
GVariant *changed_properties,
const gchar* const *invalidated_properties);
/*< private >*/
gpointer padding[8];
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_object_manager_client_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_manager_client_new (GDBusConnection *connection,
GDBusObjectManagerClientFlags flags,
const gchar *name,
const gchar *object_path,
GDBusProxyTypeFunc get_proxy_type_func,
gpointer get_proxy_type_user_data,
GDestroyNotify get_proxy_type_destroy_notify,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
GDBusObjectManager *g_dbus_object_manager_client_new_finish (GAsyncResult *res,
GError **error);
GLIB_AVAILABLE_IN_ALL
GDBusObjectManager *g_dbus_object_manager_client_new_sync (GDBusConnection *connection,
GDBusObjectManagerClientFlags flags,
const gchar *name,
const gchar *object_path,
GDBusProxyTypeFunc get_proxy_type_func,
gpointer get_proxy_type_user_data,
GDestroyNotify get_proxy_type_destroy_notify,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_manager_client_new_for_bus (GBusType bus_type,
GDBusObjectManagerClientFlags flags,
const gchar *name,
const gchar *object_path,
GDBusProxyTypeFunc get_proxy_type_func,
gpointer get_proxy_type_user_data,
GDestroyNotify get_proxy_type_destroy_notify,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GLIB_AVAILABLE_IN_ALL
GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_finish (GAsyncResult *res,
GError **error);
GLIB_AVAILABLE_IN_ALL
GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_sync (GBusType bus_type,
GDBusObjectManagerClientFlags flags,
const gchar *name,
const gchar *object_path,
GDBusProxyTypeFunc get_proxy_type_func,
gpointer get_proxy_type_user_data,
GDestroyNotify get_proxy_type_destroy_notify,
GCancellable *cancellable,
GError **error);
GLIB_AVAILABLE_IN_ALL
GDBusConnection *g_dbus_object_manager_client_get_connection (GDBusObjectManagerClient *manager);
GLIB_AVAILABLE_IN_ALL
GDBusObjectManagerClientFlags g_dbus_object_manager_client_get_flags (GDBusObjectManagerClient *manager);
GLIB_AVAILABLE_IN_ALL
const gchar *g_dbus_object_manager_client_get_name (GDBusObjectManagerClient *manager);
GLIB_AVAILABLE_IN_ALL
gchar *g_dbus_object_manager_client_get_name_owner (GDBusObjectManagerClient *manager);
G_END_DECLS
#endif /* __G_DBUS_OBJECT_MANAGER_CLIENT_H */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_OBJECT_MANAGER_SERVER_H__
#define __G_DBUS_OBJECT_MANAGER_SERVER_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_OBJECT_MANAGER_SERVER (g_dbus_object_manager_server_get_type ())
#define G_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServer))
#define G_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass))
#define G_DBUS_OBJECT_MANAGER_SERVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass))
#define G_IS_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER))
#define G_IS_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER))
typedef struct _GDBusObjectManagerServerClass GDBusObjectManagerServerClass;
typedef struct _GDBusObjectManagerServerPrivate GDBusObjectManagerServerPrivate;
/**
* GDBusObjectManagerServer:
*
* The #GDBusObjectManagerServer structure contains private data and should
* only be accessed using the provided API.
*
* Since: 2.30
*/
struct _GDBusObjectManagerServer
{
/*< private >*/
GObject parent_instance;
GDBusObjectManagerServerPrivate *priv;
};
/**
* GDBusObjectManagerServerClass:
* @parent_class: The parent class.
*
* Class structure for #GDBusObjectManagerServer.
*
* Since: 2.30
*/
struct _GDBusObjectManagerServerClass
{
GObjectClass parent_class;
/*< private >*/
gpointer padding[8];
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_object_manager_server_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDBusObjectManagerServer *g_dbus_object_manager_server_new (const gchar *object_path);
GLIB_AVAILABLE_IN_ALL
GDBusConnection *g_dbus_object_manager_server_get_connection (GDBusObjectManagerServer *manager);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_manager_server_set_connection (GDBusObjectManagerServer *manager,
GDBusConnection *connection);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_manager_server_export (GDBusObjectManagerServer *manager,
GDBusObjectSkeleton *object);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_manager_server_export_uniquely (GDBusObjectManagerServer *manager,
GDBusObjectSkeleton *object);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_object_manager_server_is_exported (GDBusObjectManagerServer *manager,
GDBusObjectSkeleton *object);
GLIB_AVAILABLE_IN_ALL
gboolean g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager,
const gchar *object_path);
G_END_DECLS
#endif /* __G_DBUS_OBJECT_MANAGER_SERVER_H */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_OBJECT_PROXY_H__
#define __G_DBUS_OBJECT_PROXY_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_OBJECT_PROXY (g_dbus_object_proxy_get_type ())
#define G_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxy))
#define G_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass))
#define G_DBUS_OBJECT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass))
#define G_IS_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_PROXY))
#define G_IS_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_PROXY))
typedef struct _GDBusObjectProxyClass GDBusObjectProxyClass;
typedef struct _GDBusObjectProxyPrivate GDBusObjectProxyPrivate;
/**
* GDBusObjectProxy:
*
* The #GDBusObjectProxy structure contains private data and should
* only be accessed using the provided API.
*
* Since: 2.30
*/
struct _GDBusObjectProxy
{
/*< private >*/
GObject parent_instance;
GDBusObjectProxyPrivate *priv;
};
/**
* GDBusObjectProxyClass:
* @parent_class: The parent class.
*
* Class structure for #GDBusObjectProxy.
*
* Since: 2.30
*/
struct _GDBusObjectProxyClass
{
GObjectClass parent_class;
/*< private >*/
gpointer padding[8];
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_object_proxy_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDBusObjectProxy *g_dbus_object_proxy_new (GDBusConnection *connection,
const gchar *object_path);
GLIB_AVAILABLE_IN_ALL
GDBusConnection *g_dbus_object_proxy_get_connection (GDBusObjectProxy *proxy);
G_END_DECLS
#endif /* __G_DBUS_OBJECT_PROXY_H */
/* GDBus - GLib D-Bus Library
*
* Copyright (C) 2008-2010 Red Hat, Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __G_DBUS_OBJECT_SKELETON_H__
#define __G_DBUS_OBJECT_SKELETON_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_DBUS_OBJECT_SKELETON (g_dbus_object_skeleton_get_type ())
#define G_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeleton))
#define G_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass))
#define G_DBUS_OBJECT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass))
#define G_IS_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_SKELETON))
#define G_IS_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_SKELETON))
typedef struct _GDBusObjectSkeletonClass GDBusObjectSkeletonClass;
typedef struct _GDBusObjectSkeletonPrivate GDBusObjectSkeletonPrivate;
/**
* GDBusObjectSkeleton:
*
* The #GDBusObjectSkeleton structure contains private data and should only be
* accessed using the provided API.
*
* Since: 2.30
*/
struct _GDBusObjectSkeleton
{
/*< private >*/
GObject parent_instance;
GDBusObjectSkeletonPrivate *priv;
};
/**
* GDBusObjectSkeletonClass:
* @parent_class: The parent class.
* @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
*
* Class structure for #GDBusObjectSkeleton.
*
* Since: 2.30
*/
struct _GDBusObjectSkeletonClass
{
GObjectClass parent_class;
/* Signals */
gboolean (*authorize_method) (GDBusObjectSkeleton *object,
GDBusInterfaceSkeleton *interface_,
GDBusMethodInvocation *invocation);
/*< private >*/
gpointer padding[8];
};
GLIB_AVAILABLE_IN_ALL
GType g_dbus_object_skeleton_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
GDBusObjectSkeleton *g_dbus_object_skeleton_new (const gchar *object_path);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_skeleton_flush (GDBusObjectSkeleton *object);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_skeleton_add_interface (GDBusObjectSkeleton *object,
GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_skeleton_remove_interface (GDBusObjectSkeleton *object,
GDBusInterfaceSkeleton *interface_);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_skeleton_remove_interface_by_name (GDBusObjectSkeleton *object,
const gchar *interface_name);
GLIB_AVAILABLE_IN_ALL
void g_dbus_object_skeleton_set_object_path (GDBusObjectSkeleton *object,
const gchar *object_path);
G_END_DECLS
#endif /* __G_DBUS_OBJECT_SKELETON_H */
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment