Skip to content

Commit

Permalink
Added a group for media collection related implementations.
Browse files Browse the repository at this point in the history
  • Loading branch information
shtomar-adb committed Feb 24, 2021
1 parent ad8ded6 commit e88354d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@

import Foundation

protocol MediaServiceable {
protocol MediaProcessor {

func createSession() -> MediaSession

func processSessions()

func abortAllSessions()
func createSession(state: MediaState) -> MediaSession
}
2 changes: 1 addition & 1 deletion AEPMedia/Sources/MediaSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protocol MediaSession {

func processHit(hit: MediaHit)

func endSession()
func end()

func abort()
}
16 changes: 16 additions & 0 deletions AEPMedia/Sources/MediaState.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
Copyright 2021 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import Foundation

class MediaState {
//TODO: implementation of this class.
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,14 @@
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import Foundation

protocol MediaHit {

init(eventType: String, params: [String: Any], metaData: [String:String], qoeData: [String:Any], playHead: Double, timeInterval: TimeInterval)

func getEventType() -> [String:Any]

func getParams() -> [String:String]

func getCustomMetaData() -> [String:String]

func getQoeData() -> [String:Any]

func getPlayHead() -> Double

func getTimeStamp() -> TimeInterval
import Foundation

class MediaHit {
//TODO: Implement class MediaHit.
}
28 changes: 20 additions & 8 deletions build/AEPMedia.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
2E20D4A725CA154C00B5CCB8 /* MediaRuleEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E20D4A525CA154C00B5CCB8 /* MediaRuleEngine.swift */; };
2E20D4AB25CA544000B5CCB8 /* MediaRuleEngineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E20D4AA25CA544000B5CCB8 /* MediaRuleEngineTests.swift */; };
2EFF1B5B25BF57FC00375965 /* AEPMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EFF1B5125BF57FC00375965 /* AEPMedia.framework */; };
3D9D530B25D4AFB000F33EB7 /* MediaHit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9D530A25D4AFB000F33EB7 /* MediaHit.swift */; };
3D2C836325E5CADC0064E0D4 /* MediaState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D2C836225E5CADC0064E0D4 /* MediaState.swift */; };
3D2C836A25E5CFDF0064E0D4 /* MediaHit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D2C836925E5CFDF0064E0D4 /* MediaHit.swift */; };
3D9D531725D5E73100F33EB7 /* MediaSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9D531625D5E73100F33EB7 /* MediaSession.swift */; };
3D9D531B25D5E75B00F33EB7 /* MediaEventTracking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9D531A25D5E75B00F33EB7 /* MediaEventTracking.swift */; };
3D9D531F25D5ED3E00F33EB7 /* MediaServiceable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9D531E25D5ED3E00F33EB7 /* MediaServiceable.swift */; };
3D9D531F25D5ED3E00F33EB7 /* MediaProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9D531E25D5ED3E00F33EB7 /* MediaProcessor.swift */; };
7104D52FCE7CD4FBED7235C4 /* Pods_AEPMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13F8B2DE1682787F0FD4D771 /* Pods_AEPMedia.framework */; };
AC36EC3F25C9F11E00A37345 /* MediaTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC36EC3525C9F11E00A37345 /* MediaTracker.swift */; };
AC36EC4025C9F11E00A37345 /* Media.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC36EC3625C9F11E00A37345 /* Media.swift */; };
Expand Down Expand Up @@ -44,10 +45,11 @@
2E5A32F865BD4CB1D4FACE3F /* Pods-AEPMedia.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AEPMedia.release.xcconfig"; path = "Target Support Files/Pods-AEPMedia/Pods-AEPMedia.release.xcconfig"; sourceTree = "<group>"; };
2EFF1B5125BF57FC00375965 /* AEPMedia.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AEPMedia.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2EFF1B5A25BF57FC00375965 /* AEPMediaTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AEPMediaTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3D9D530A25D4AFB000F33EB7 /* MediaHit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaHit.swift; sourceTree = "<group>"; };
3D2C836225E5CADC0064E0D4 /* MediaState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaState.swift; sourceTree = "<group>"; };
3D2C836925E5CFDF0064E0D4 /* MediaHit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaHit.swift; sourceTree = "<group>"; };
3D9D531625D5E73100F33EB7 /* MediaSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaSession.swift; sourceTree = "<group>"; };
3D9D531A25D5E75B00F33EB7 /* MediaEventTracking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaEventTracking.swift; sourceTree = "<group>"; };
3D9D531E25D5ED3E00F33EB7 /* MediaServiceable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaServiceable.swift; sourceTree = "<group>"; };
3D9D531E25D5ED3E00F33EB7 /* MediaProcessor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProcessor.swift; sourceTree = "<group>"; };
81B6B11A87DE4E2228FA46FB /* Pods_AEPMedia_AEPMediaTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AEPMedia_AEPMediaTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A7EED2E95CAF988912D5E599 /* Pods-AEPMedia.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AEPMedia.debug.xcconfig"; path = "Target Support Files/Pods-AEPMedia/Pods-AEPMedia.debug.xcconfig"; sourceTree = "<group>"; };
AC36EC2E25C9F11E00A37345 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -125,6 +127,14 @@
name = Products;
sourceTree = "<group>";
};
3D2C836625E5CFAA0064E0D4 /* mediacollection */ = {
isa = PBXGroup;
children = (
3D2C836925E5CFDF0064E0D4 /* MediaHit.swift */,
);
path = mediacollection;
sourceTree = "<group>";
};
9598EB9A2980A6BD84A67D20 /* Pods */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -177,6 +187,7 @@
AC36EC3425C9F11E00A37345 /* Sources */ = {
isa = PBXGroup;
children = (
3D2C836625E5CFAA0064E0D4 /* mediacollection */,
2E20D4A425CA154C00B5CCB8 /* MediaRule.swift */,
2E20D4A525CA154C00B5CCB8 /* MediaRuleEngine.swift */,
AC36EC3525C9F11E00A37345 /* MediaTracker.swift */,
Expand All @@ -185,10 +196,10 @@
AC36EC3825C9F11E00A37345 /* Media+PublicAPI.swift */,
AC36EC3925C9F11E00A37345 /* MediaConstants.swift */,
AC36EC3A25C9F11E00A37345 /* Info.plist */,
3D9D530A25D4AFB000F33EB7 /* MediaHit.swift */,
3D9D531625D5E73100F33EB7 /* MediaSession.swift */,
3D9D531A25D5E75B00F33EB7 /* MediaEventTracking.swift */,
3D9D531E25D5ED3E00F33EB7 /* MediaServiceable.swift */,
3D9D531E25D5ED3E00F33EB7 /* MediaProcessor.swift */,
3D2C836225E5CADC0064E0D4 /* MediaState.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand Down Expand Up @@ -370,15 +381,16 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3D2C836325E5CADC0064E0D4 /* MediaState.swift in Sources */,
AC36EC4325C9F11E00A37345 /* MediaConstants.swift in Sources */,
AC36EC4025C9F11E00A37345 /* Media.swift in Sources */,
2E20D4A725CA154C00B5CCB8 /* MediaRuleEngine.swift in Sources */,
3D2C836A25E5CFDF0064E0D4 /* MediaHit.swift in Sources */,
AC36EC3F25C9F11E00A37345 /* MediaTracker.swift in Sources */,
3D9D531B25D5E75B00F33EB7 /* MediaEventTracking.swift in Sources */,
2E20D4A625CA154C00B5CCB8 /* MediaRule.swift in Sources */,
AC36EC4225C9F11E00A37345 /* Media+PublicAPI.swift in Sources */,
3D9D530B25D4AFB000F33EB7 /* MediaHit.swift in Sources */,
3D9D531F25D5ED3E00F33EB7 /* MediaServiceable.swift in Sources */,
3D9D531F25D5ED3E00F33EB7 /* MediaProcessor.swift in Sources */,
3D9D531725D5E73100F33EB7 /* MediaSession.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down

0 comments on commit e88354d

Please sign in to comment.