#!/usr/local/bin/scripts/sh # # * :_ ? # * _CommonOptions # -h # -n # -o # -s # * _CommonParameters # * MakeIsoFs1000 # * MakeFsBegin # lock per tty # * MakeFsEnd # * _MakeMediaInfo # * _MakeMediaInfo # * _MakeMediaInfo # # #.Y / 70 83 / / / / 105 / / / / / / ;A4_QUER.Y #.YT 3 2 0 0 3 3 1 / / / #.H!a!0:linux//io/disk_/mediaAccess_/THIS!0.!c # #/*************************************************************************** # io disk_ mediaAccess_ Constructors # ++++++++++++++++++++++++++++++++++ # # purpose : constructors for "mediaAccess"-functions for mass-storage-medias # # begin : Wed May 10 12:22:10 CEST 2017 # # changes : # # copyright : (C) 2017 by Thomas Bruecker # # email : public@thomas-r-bruecker.ch # # version : -0.0.0 # #***************************************************************************/ #/*************************************************************************** # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation; either version 2 of the License, or * # * (at your option) any later version. * # * * # * This program 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 * # * General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program; if not, write to the Free Software * # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * # * MA 02110-1301 USA. * # * * # ***************************************************************************/ # MyHash("linux//io/disk/mediaAccess/THIS") = 0x0EAA # # * for every function: # * if returned result is not commented, the function returns 0 on no-error. # globals: MediaAccessHomeURL0x0EAA='http://www.storage-media-access.ch' MediaInfoCopyright0x0EAA="$Copyright0x0EAA" MediaInfoCopyrightDetails0x0EAA="${MediaAccessHomeURL0x0EAA}/.licenses/MediaInfo.html" disk_mediaAccess_col__CommonParameters() { # $1: media handler uuid; # $2: prefix; most often: indent; # * writes the common parameters to "stdout". local MediaHandlerUUID PREFIX MediaHandlerUUID="$1" PREFIX="$2" disk_mediaAccess_col__COPYRIGHT "$PREFIX" disk_mediaAccess_col__CopyrightDetails "$PREFIX" disk_mediaAccess_col__URL "$MediaHandlerUUID" "$PREFIX" } disk_mediaAccess_col__COPYRIGHT() { # $1: prefix; most often: indent; # * writes the copyright-parameter to "stdout". # global: MediaInfoCopyright0x0EAA local PREFIX PREFIX="$1" echo "${PREFIX}COPYRIGHT='$MediaInfoCopyright0x0EAA'" } disk_mediaAccess_col__CopyrightDetails() { # $1: prefix; most often: indent; # * writes the copyright-details-parameter to "stdout". # global: MediaInfoCopyrightDetails0x0EAA local PREFIX PREFIX="$1" echo "${PREFIX}CopyrightDetails='$MediaInfoCopyrightDetails0x0EAA'" } disk_mediaAccess_col__METHOD() { # $1: media-handler-uuid; # $2: prefix; most often: indent; # * writes the method header to "stdout". local MediaHandlerUUID PREFIX MediaHandlerUUID="$1" PREFIX="$2" MediaHandlerUUID="$(string_2Uppercase "$MediaHandlerUUID")" echo "${PREFIX}{$MediaHandlerUUID}(" } disk_mediaAccess_col__MethodEnd() { # $2: prefix; most often: indent; # * writes the end of a method to "stdout". local PREFIX PREFIX="$1" echo "${PREFIX})" } disk_mediaAccess_col__SIZE() { # $1: size; # $2: prefix; most often: indent; # * writes the size-parameter to "stdout". local SIZE SIZE="$1" PREFIX="$2" echo "${PREFIX}SIZE='$SIZE'" } disk_mediaAccess_col__START() { # $1: start offset; # $2: prefix; most often: indent; # * writes the start-parameter to "stdout". local START START="$1" PREFIX="$2" echo "${PREFIX}START='$START'" } disk_mediaAccess_col__URL() { # $1: media handler uuid; # $2: prefix; most often: indent; # * writes the url-parameter to "stdout". # global: MediaAccessHomeURL0x0EAA local MediaHandlerUUID PREFIX MediaHandlerUUID="$1" PREFIX="$2" MediaHandlerUUID="{$(string_2Lowercase "$MediaHandlerUUID")}" echo "${PREFIX}URL='${MediaAccessHomeURL0x0EAA}/${MediaHandlerUUID}'" } disk_mediaAccess_col__UUID() { # $1: uuid; # $2: prefix; most often: indent; # * writes the uiid-parameter to "stdout". local PREFIX UUID UUID="$1" PREFIX="$2" UUID="$(string_2Uppercase "$UUID")" echo "${PREFIX}UUID='$UUID'" }