libzypp
12.16.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
User data as transaction id
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
proxyinfo
CredentialFileReader.cc
CredentialFileReader.h
CredentialManager.cc
CredentialManager.h
CurlConfig.cc
CurlConfig.h
MediaAccess.cc
MediaAccess.h
MediaAria2c.cc
MediaAria2c.h
MediaBlockList.cc
MediaBlockList.h
MediaCD.cc
MediaCD.h
MediaCIFS.cc
MediaCIFS.h
MediaCurl.cc
MediaCurl.h
MediaDIR.cc
MediaDIR.h
MediaDISK.cc
MediaDISK.h
MediaException.cc
MediaException.h
MediaHandler.cc
MediaHandler.h
MediaISO.cc
MediaISO.h
MediaManager.cc
MediaManager.h
MediaMultiCurl.cc
MediaMultiCurl.h
MediaNFS.cc
MediaNFS.h
MediaPlugin.cc
MediaPlugin.h
MediaPriority.cc
MediaPriority.h
MediaSource.cc
MediaSource.h
MediaUserAuth.cc
MediaUserAuth.h
MetaLinkParser.cc
MetaLinkParser.h
Mount.cc
Mount.h
ProxyInfo.cc
ProxyInfo.h
TransferSettings.cc
TransferSettings.h
UrlResolverPlugin.cc
UrlResolverPlugin.h
ZsyncParser.cc
ZsyncParser.h
misc
parser
pool
repo
sat
solver
target
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
MediaSource.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_MEDIA_MEDIASOURCE_H
13
#define ZYPP_MEDIA_MEDIASOURCE_H
14
15
#include <iosfwd>
16
17
#include "
zypp/Pathname.h
"
18
#include "
zypp/base/String.h
"
19
#include "
zypp/base/PtrTypes.h
"
20
21
22
namespace
zypp {
23
namespace
media {
24
26
29
typedef
unsigned
int
MediaAccessId
;
30
31
33
36
class
MediaSource
37
{
38
public
:
39
MediaSource
(
const
std::string &_type,
const
std::string &_name,
40
unsigned
int
_maj=0,
unsigned
int
_min=0,
41
const
std::string &_bdir=std::string(),
bool
_own=
true
)
42
:
maj_nr
(_maj)
43
,
min_nr
(_min)
44
,
type
(_type)
45
,
name
(_name)
46
,
bdir
(_bdir)
47
,
iown
(_own)
48
{}
49
50
MediaSource
()
51
:
maj_nr
(0)
52
,
min_nr
(0)
53
{}
54
55
virtual
56
~MediaSource
()
57
{}
58
62
virtual
bool
equals
(
const
MediaSource
&src)
const
63
{
64
if
(
type
== src.
type
)
65
{
66
if
(
maj_nr
== 0)
67
return
name
== src.
name
;
68
else
69
return
maj_nr
== src.
maj_nr
&&
70
min_nr
== src.
min_nr
;
71
}
72
return
false
;
73
}
74
78
virtual
std::string
asString
()
const
79
{
80
std::string tmp1;
81
if
(
maj_nr
!= 0)
82
{
83
tmp1 =
"["
+
str::numstring
(
maj_nr
) +
","
+
84
str::numstring
(
min_nr
) +
"]"
;
85
}
86
return
type
+
"<"
+
name
+ tmp1 +
">"
;
87
}
88
89
unsigned
int
maj_nr
;
90
unsigned
int
min_nr
;
91
std::string
type
;
92
std::string
name
;
93
std::string
bdir
;
94
bool
iown
;
95
};
96
98
inline
std::ostream &
operator<<
( std::ostream & str,
const
MediaSource
& obj )
99
{
return
str << obj.
asString
(); }
100
102
105
class
AttachPoint
106
{
107
public
:
108
AttachPoint
(
const
Pathname &_path=Pathname(),
109
bool
_temp=
true
)
110
:
path
(_path)
111
,
temp
(_temp)
112
{}
113
114
bool
empty
()
const
{
return
path
.empty(); }
115
116
Pathname
path
;
117
bool
temp
;
118
};
119
121
std::ostream &
operator<<
( std::ostream & str,
const
AttachPoint
& obj );
122
124
typedef
zypp::RW_pointer<MediaSource>
MediaSourceRef
;
125
typedef
zypp::RW_pointer<AttachPoint>
AttachPointRef
;
126
127
129
133
struct
AttachedMedia
134
{
135
AttachedMedia
()
136
{}
137
138
AttachedMedia
(
const
MediaSourceRef
&_mediaSource,
139
const
AttachPointRef
&_attachPoint)
140
:
mediaSource
( _mediaSource)
141
,
attachPoint
( _attachPoint)
142
{}
143
144
MediaSourceRef
mediaSource
;
145
AttachPointRef
attachPoint
;
146
};
147
149
std::ostream &
operator<<
( std::ostream & str,
const
AttachedMedia
& obj );
150
151
}
// namespace media
152
}
// namespace zypp
153
154
155
#endif // ZYPP_MEDIA_MEDIASOURCE_H
156
zypp
media
MediaSource.h
Generated by
1.8.2